blob: af25998cf56cb632b9a2a9a42e082182d0a8b2bf [file] [log] [blame]
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// Returns [true] if [address] is an IPv6 address.
bool isIPv6Address(String address) {
try {
Uri.parseIPv6Address(address);
return true;
} on FormatException {
return false;
}
}