From a9d43d5a1b2360a00393d2446daf6158b2049330 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Fri, 8 Dec 2023 12:29:27 +0000 Subject: [PATCH] [nfc]: Remove unnecessary imports of dart:ui Upstream Flutter (in flutter/flutter@c6741614041 ) changed `flutter/material.dart` to additionally export many types from `dart:ui`. This caused a lot of our imports to trigger an analysis warning of `unnecessary_import`. --- lib/widgets/message_list.dart | 1 - lib/widgets/text.dart | 1 - lib/widgets/unread_count_badge.dart | 1 - test/flutter_checks.dart | 2 -- test/widgets/text_test.dart | 1 - 5 files changed, 6 deletions(-) diff --git a/lib/widgets/message_list.dart b/lib/widgets/message_list.dart index 5efe6e4034c..4e14f87ceff 100644 --- a/lib/widgets/message_list.dart +++ b/lib/widgets/message_list.dart @@ -1,5 +1,4 @@ import 'dart:math'; -import 'dart:ui'; import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; diff --git a/lib/widgets/text.dart b/lib/widgets/text.dart index 0111dafd7e0..1a80cee4bc1 100644 --- a/lib/widgets/text.dart +++ b/lib/widgets/text.dart @@ -1,5 +1,4 @@ import 'dart:io'; -import 'dart:ui'; import 'package:flutter/widgets.dart'; /// A mergeable [TextStyle] with 'Source Code Pro' and platform-aware fallbacks. diff --git a/lib/widgets/unread_count_badge.dart b/lib/widgets/unread_count_badge.dart index cc654eef37a..dd7d97127f0 100644 --- a/lib/widgets/unread_count_badge.dart +++ b/lib/widgets/unread_count_badge.dart @@ -1,4 +1,3 @@ -import 'dart:ui'; import 'package:flutter/material.dart'; diff --git a/test/flutter_checks.dart b/test/flutter_checks.dart index 92e62e04a09..c83ff46cdd3 100644 --- a/test/flutter_checks.dart +++ b/test/flutter_checks.dart @@ -1,8 +1,6 @@ /// `package:checks`-related extensions for the Flutter framework. library; -import 'dart:ui'; - import 'package:checks/checks.dart'; import 'package:flutter/services.dart'; import 'package:flutter/widgets.dart'; diff --git a/test/widgets/text_test.dart b/test/widgets/text_test.dart index 37e7bbb7880..584950c736b 100644 --- a/test/widgets/text_test.dart +++ b/test/widgets/text_test.dart @@ -1,4 +1,3 @@ -import 'dart:ui'; import 'package:checks/checks.dart'; import 'package:flutter/material.dart';