diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 55ca830..10d6754 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -7,7 +7,7 @@ FlutterApplication and put your custom class here. --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..c4a603d --- /dev/null +++ b/example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..c4a603d --- /dev/null +++ b/example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png index db77bb4..9bcc433 100644 Binary files a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..fcb19ea Binary files /dev/null and b/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 0000000..ff662e6 Binary files /dev/null and b/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png index 17987b7..9f27c33 100644 Binary files a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..886f432 Binary files /dev/null and b/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 0000000..fbe2790 Binary files /dev/null and b/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png index 09d4391..a482cb3 100644 Binary files a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..f0ab7b4 Binary files /dev/null and b/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 0000000..3965a65 Binary files /dev/null and b/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index d5f1c8d..4a66ce1 100644 Binary files a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..3b6d58d Binary files /dev/null and b/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..2c5edb7 Binary files /dev/null and b/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index 4d6372e..b128932 100644 Binary files a/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..bde8c57 Binary files /dev/null and b/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..2d5a631 Binary files /dev/null and b/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/example/pubspec.lock b/example/pubspec.lock index c05921d..ad62fde 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -65,7 +65,7 @@ packages: name: charcode url: "https://pub.flutter-io.cn" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.1.3" cli_util: dependency: transitive description: @@ -112,7 +112,7 @@ packages: name: flutter_easyrefresh url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.6" + version: "2.1.8" flutter_localizations: dependency: "direct main" description: flutter @@ -138,7 +138,7 @@ packages: name: get url: "https://pub.flutter-io.cn" source: hosted - version: "3.17.1" + version: "3.25.6" glob: dependency: transitive description: @@ -173,14 +173,14 @@ packages: name: image_picker url: "https://pub.flutter-io.cn" source: hosted - version: "0.6.7+15" + version: "0.6.7+22" image_picker_platform_interface: dependency: transitive description: name: image_picker_platform_interface url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.1" + version: "1.1.6" intl: dependency: transitive description: @@ -201,7 +201,7 @@ packages: name: lpinyin url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.0" + version: "1.1.1" meta: dependency: transitive description: @@ -255,7 +255,7 @@ packages: name: source_span url: "https://pub.flutter-io.cn" source: hosted - version: "1.8.0-nullsafety.2" + version: "1.7.0" states_rebuilder: dependency: transitive description: @@ -269,14 +269,14 @@ packages: name: string_scanner url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.0.5" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.flutter-io.cn" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.1.0" typed_data: dependency: transitive description: @@ -297,7 +297,14 @@ packages: name: velocity_x url: "https://pub.flutter-io.cn" source: hosted - version: "1.3.1" + version: "1.4.1" + vxstate: + dependency: transitive + description: + name: vxstate + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.1" sdks: dart: ">=2.10.0 <2.11.0" flutter: ">=1.17.0 <2.0.0" diff --git a/lib/bar/as_tabbar.dart b/lib/bar/as_tabbar.dart index 4418ce2..0a5476c 100644 --- a/lib/bar/as_tabbar.dart +++ b/lib/bar/as_tabbar.dart @@ -10,7 +10,7 @@ import 'package:velocity_x/velocity_x.dart'; /// [items] /// /// [controller] see more TabController -class ASTabBar extends StatefulWidget implements PreferredSizeWidget { +class ASTabBar extends StatelessWidget implements PreferredSizeWidget { ///items final List items; @@ -49,24 +49,16 @@ class ASTabBar extends StatefulWidget implements PreferredSizeWidget { : items = null, super(key: key); - @override - _ASTabBarState createState() => _ASTabBarState(); - - @override - Size get preferredSize => Size.fromHeight(46); -} - -class _ASTabBarState extends State { - bool get isTag => widget.items?.isEmpty ?? true; + bool get isTag => items?.isEmpty ?? true; @override Widget build(BuildContext context) { return Align( alignment: Alignment.center, child: TabBar( - isScrollable: widget.isScrollable, - controller: widget.controller, + isScrollable: isScrollable, + controller: controller, tabs: isTag - ? widget.tabItems.map((e) { + ? tabItems.map((e) { return Tab( child: ASBadge( child: e.title.text.make(), @@ -74,7 +66,7 @@ class _ASTabBarState extends State { ), ); }).toList() - : widget.items + : items .map((e) => Tab( child: e.text.make(), )) @@ -94,4 +86,7 @@ class _ASTabBarState extends State { ), ); } + + @override + Size get preferredSize => Size.fromHeight(46); } diff --git a/pubspec.lock b/pubspec.lock index b363d7c..1818bb9 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -98,7 +98,7 @@ packages: name: flutter_easyrefresh url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.6" + version: "2.1.8" flutter_plugin_android_lifecycle: dependency: transitive description: @@ -145,14 +145,14 @@ packages: name: image_picker url: "https://pub.flutter-io.cn" source: hosted - version: "0.6.7+15" + version: "0.6.7+22" image_picker_platform_interface: dependency: transitive description: name: image_picker_platform_interface url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.1" + version: "1.1.6" intl: dependency: transitive description: @@ -166,7 +166,7 @@ packages: name: lpinyin url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.0" + version: "1.1.1" matcher: dependency: transitive description: @@ -276,7 +276,14 @@ packages: name: velocity_x url: "https://pub.flutter-io.cn" source: hosted - version: "1.3.1" + version: "1.4.1" + vxstate: + dependency: transitive + description: + name: vxstate + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.1" sdks: dart: ">=2.10.0-110 <2.11.0" flutter: ">=1.17.0 <2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index f5abe08..26b21b2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,9 +11,9 @@ dependencies: flutter: sdk: flutter flutter_screenutil: ^3.2.0 - flutter_easyrefresh: ^2.1.6 - lpinyin: ^1.1.0 - image_picker: ^0.6.7+15 + flutter_easyrefresh: ^2.1.8 + lpinyin: ^1.1.1 + image_picker: ^0.6.7+22 bot_toast: ^3.0.5 velocity_x: expandable: ^4.1.4