diff --git a/example/.fvm/fvm_config.json b/example/.fvm/fvm_config.json new file mode 100644 index 0000000..7f3778c --- /dev/null +++ b/example/.fvm/fvm_config.json @@ -0,0 +1,4 @@ +{ + "flutterSdkVersion": "2.2.0", + "flavors": {} +} \ No newline at end of file diff --git a/example/lib/codeviewer/code_style.dart b/example/lib/codeviewer/code_style.dart index 7297bc4..8754484 100644 --- a/example/lib/codeviewer/code_style.dart +++ b/example/lib/codeviewer/code_style.dart @@ -14,19 +14,19 @@ class CodeStyle extends InheritedWidget { this.punctuationStyle, this.classStyle, this.constantStyle, - @required Widget child, + required Widget child, }) : super(child: child); - final TextStyle baseStyle; - final TextStyle numberStyle; - final TextStyle commentStyle; - final TextStyle keywordStyle; - final TextStyle stringStyle; - final TextStyle punctuationStyle; - final TextStyle classStyle; - final TextStyle constantStyle; + final TextStyle? baseStyle; + final TextStyle? numberStyle; + final TextStyle? commentStyle; + final TextStyle? keywordStyle; + final TextStyle? stringStyle; + final TextStyle? punctuationStyle; + final TextStyle? classStyle; + final TextStyle? constantStyle; - static CodeStyle of(BuildContext context) { + static CodeStyle? of(BuildContext context) { return context.dependOnInheritedWidgetOfExactType(); } diff --git a/example/lib/common/base_page.dart b/example/lib/common/base_page.dart index 5d1bf53..ab1211b 100644 --- a/example/lib/common/base_page.dart +++ b/example/lib/common/base_page.dart @@ -6,12 +6,12 @@ import 'code_view.dart'; class BasePage extends StatelessWidget { final String title; final Widget body; - final List actions; - final CodeBuilder codeBuilder; + final List? actions; + final CodeBuilder? codeBuilder; const BasePage( - {Key key, - @required this.title, - @required this.body, + {Key? key, + required this.title, + required this.body, this.actions, this.codeBuilder}) : super(key: key); diff --git a/example/lib/common/code_tile.dart b/example/lib/common/code_tile.dart index e5e411f..1f9268c 100644 --- a/example/lib/common/code_tile.dart +++ b/example/lib/common/code_tile.dart @@ -4,10 +4,10 @@ import 'package:get/get.dart'; import 'code_view.dart'; class CodeTile extends StatelessWidget { - final Widget title; - final Widget subTitle; - final CodeBuilder builder; - const CodeTile({Key key, this.title, this.subTitle, this.builder}) + final Widget? title; + final Widget? subTitle; + final CodeBuilder? builder; + const CodeTile({Key? key, this.title, this.subTitle, this.builder}) : super(key: key); @override diff --git a/example/lib/common/code_view.dart b/example/lib/common/code_view.dart index f3aaea8..d1882ba 100644 --- a/example/lib/common/code_view.dart +++ b/example/lib/common/code_view.dart @@ -5,9 +5,9 @@ import '../codeviewer/code_style.dart'; typedef CodeBuilder = TextSpan Function(BuildContext context); class CodeView extends StatefulWidget { - final CodeBuilder text; + final CodeBuilder? text; final String title; - CodeView({Key key, @required this.text, this.title = 'Code'}) + CodeView({Key? key, required this.text, this.title = 'Code'}) : super(key: key); @override @@ -33,7 +33,7 @@ class _CodeViewState extends State { classStyle: codeTheme.copyWith(color: Colors.yellow), constantStyle: codeTheme.copyWith(color: Colors.pink), child: - Builder(builder: (context) => Text.rich(widget.text(context))), + Builder(builder: (context) => Text.rich(widget.text!(context))), )), ); } diff --git a/example/lib/component/example_scaffold.dart b/example/lib/component/example_scaffold.dart index ca6011a..f882e48 100644 --- a/example/lib/component/example_scaffold.dart +++ b/example/lib/component/example_scaffold.dart @@ -5,13 +5,13 @@ import 'package:get/get.dart'; class ExampleScaffold extends StatelessWidget { final String title; - final CodeBuilder text; + final CodeBuilder? text; final List children; const ExampleScaffold({ - Key key, - @required this.title, + Key? key, + required this.title, this.text, - @required this.children, + required this.children, }) : super(key: key); @override diff --git a/example/lib/data/color_object.dart b/example/lib/data/color_object.dart index 5a82f42..c001529 100644 --- a/example/lib/data/color_object.dart +++ b/example/lib/data/color_object.dart @@ -2,9 +2,9 @@ import 'package:ansu_ui/ansu_ui.dart'; import 'package:flutter/material.dart'; class ColorObject { - Color color; - String name; - String codeName; + Color? color; + String? name; + String? codeName; ColorObject({ this.color, this.name, diff --git a/example/lib/extension/example_list_ext.dart b/example/lib/extension/example_list_ext.dart index 3ba2945..7777280 100644 --- a/example/lib/extension/example_list_ext.dart +++ b/example/lib/extension/example_list_ext.dart @@ -6,7 +6,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; class ExampleListExt extends StatefulWidget { - const ExampleListExt({Key key}) : super(key: key); + const ExampleListExt({Key? key}) : super(key: key); @override _ExampleListExtState createState() => _ExampleListExtState(); diff --git a/example/lib/extension/example_num_ext.dart b/example/lib/extension/example_num_ext.dart index dad37a8..f758839 100644 --- a/example/lib/extension/example_num_ext.dart +++ b/example/lib/extension/example_num_ext.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class ExampleNumExt extends StatefulWidget { - ExampleNumExt({Key key}) : super(key: key); + ExampleNumExt({Key? key}) : super(key: key); @override _ExampleNumExtState createState() => _ExampleNumExtState(); diff --git a/example/lib/extension/example_string_ext.dart b/example/lib/extension/example_string_ext.dart index 28cf37b..449d092 100644 --- a/example/lib/extension/example_string_ext.dart +++ b/example/lib/extension/example_string_ext.dart @@ -4,7 +4,7 @@ import 'package:example/component/example_scaffold.dart'; import 'package:flutter/material.dart'; class ExampleStringExt extends StatefulWidget { - ExampleStringExt({Key key}) : super(key: key); + ExampleStringExt({Key? key}) : super(key: key); @override _ExampleStringExtState createState() => _ExampleStringExtState(); diff --git a/example/lib/main.dart b/example/lib/main.dart index dff1d9d..7db318b 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -37,14 +37,14 @@ class MyApp extends StatelessWidget { } class MyHomePage extends StatefulWidget { - MyHomePage({Key key}) : super(key: key); + MyHomePage({Key? key}) : super(key: key); @override _MyHomePageState createState() => _MyHomePageState(); } class _MyHomePageState extends State with TickerProviderStateMixin { - TabController _tabController; + TabController? _tabController; @override void initState() { @@ -56,9 +56,9 @@ class _MyHomePageState extends State with TickerProviderStateMixin { @override Widget build(BuildContext context) { - print(Theme.of(context).textTheme.headline1.fontFamily); + print(Theme.of(context).textTheme.headline1!.fontFamily); return ASScaffold( - leading: navigator.canPop() + leading: navigator!.canPop() ? IconButton( icon: Icon(Icons.backpack, color: Colors.black), onPressed: () {}, @@ -74,7 +74,7 @@ class _MyHomePageState extends State with TickerProviderStateMixin { ], ), bottomNavigationBar: ASNavigationBar( - controller: _tabController, + controller: _tabController!, items: [ BottomNavigationBarItem( icon: Icon(Icons.home), diff --git a/example/lib/main_extention.dart b/example/lib/main_extention.dart index b2bdc0c..f70d2d7 100644 --- a/example/lib/main_extention.dart +++ b/example/lib/main_extention.dart @@ -6,7 +6,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; class MainExtention extends StatefulWidget { - MainExtention({Key key}) : super(key: key); + MainExtention({Key? key}) : super(key: key); @override _MainExtentionState createState() => _MainExtentionState(); @@ -14,9 +14,9 @@ class MainExtention extends StatefulWidget { class _MainExtentionState extends State { _innerButton({ - VoidCallback onPressed, - Widget child, - Widget icon, + VoidCallback? onPressed, + required Widget child, + Widget? icon, }) { return TextButton( onPressed: onPressed, diff --git a/example/lib/main_home.dart b/example/lib/main_home.dart index b6549e1..37e3ec3 100644 --- a/example/lib/main_home.dart +++ b/example/lib/main_home.dart @@ -21,7 +21,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; class MainHome extends StatefulWidget { - MainHome({Key key}) : super(key: key); + MainHome({Key? key}) : super(key: key); @override _MainHomeState createState() => _MainHomeState(); @@ -29,15 +29,15 @@ class MainHome extends StatefulWidget { class _MainHomeState extends State { _innerButton({ - VoidCallback onPressed, - String title, - IconData icon, + VoidCallback? onPressed, + required String title, + IconData? icon, }) { return TextButton( onPressed: onPressed, child: Row( children: [ - Expanded(child: Icon(icon) ?? SizedBox()), + Expanded(child: icon != null ? Icon(icon) : SizedBox()), Text(title), Spacer(), ], diff --git a/example/lib/main_utils.dart b/example/lib/main_utils.dart index f9de411..a2b4443 100644 --- a/example/lib/main_utils.dart +++ b/example/lib/main_utils.dart @@ -4,7 +4,7 @@ import 'package:get/get.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class MainUtils extends StatefulWidget { - MainUtils({Key key}) : super(key: key); + MainUtils({Key? key}) : super(key: key); @override _MainUtilsState createState() => _MainUtilsState(); @@ -12,9 +12,9 @@ class MainUtils extends StatefulWidget { class _MainUtilsState extends State { _innerButton({ - VoidCallback onPressed, - Widget child, - Widget icon, + VoidCallback? onPressed, + required Widget child, + Widget? icon, }) { return TextButton( onPressed: onPressed, diff --git a/example/lib/util_view/example_camera_view.dart b/example/lib/util_view/example_camera_view.dart index 510a423..5da39dc 100644 --- a/example/lib/util_view/example_camera_view.dart +++ b/example/lib/util_view/example_camera_view.dart @@ -7,7 +7,7 @@ import 'package:flutter/material.dart'; import 'package:velocity_x/velocity_x.dart'; class ExampleCameraView extends StatefulWidget { - ExampleCameraView({Key key}) : super(key: key); + ExampleCameraView({Key? key}) : super(key: key); @override _ExampleCameraViewState createState() => _ExampleCameraViewState(); @@ -24,8 +24,8 @@ class _ExampleCameraViewState extends State { ListTile( title: 'CameraView'.text.make(), onTap: () async { - File file = await camView(context, title: 'TEST'); - print(await file.length()); + File? file = await camView(context, title: 'TEST'); + print(await file?.length()); }, ), // END diff --git a/example/lib/widgets/example_bottom_button.dart b/example/lib/widgets/example_bottom_button.dart index b07f55b..93b8a0a 100644 --- a/example/lib/widgets/example_bottom_button.dart +++ b/example/lib/widgets/example_bottom_button.dart @@ -8,7 +8,7 @@ import 'package:get/get.dart'; class ExampleBottomButton extends StatefulWidget { - ExampleBottomButton({Key key}) : super(key: key); + ExampleBottomButton({Key? key}) : super(key: key); @override _ExampleBottomButtonState createState() => _ExampleBottomButtonState(); diff --git a/example/lib/widgets/example_box.dart b/example/lib/widgets/example_box.dart index 7e3cccb..7debbe9 100644 --- a/example/lib/widgets/example_box.dart +++ b/example/lib/widgets/example_box.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class ExampleBox extends StatefulWidget { - ExampleBox({Key key}) : super(key: key); + ExampleBox({Key? key}) : super(key: key); @override _ExampleBoxState createState() => _ExampleBoxState(); diff --git a/example/lib/widgets/example_button.dart b/example/lib/widgets/example_button.dart index 6e10aad..7c0c7fb 100644 --- a/example/lib/widgets/example_button.dart +++ b/example/lib/widgets/example_button.dart @@ -7,7 +7,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; class ExampleButton extends StatefulWidget { - ExampleButton({Key key}) : super(key: key); + ExampleButton({Key? key}) : super(key: key); @override _ExampleButtonState createState() => _ExampleButtonState(); @@ -153,25 +153,25 @@ class _ExampleButtonState extends State { groupValue: groupValue, value: 0, title: '候选0', - onTap: (_) => setState(() => groupValue = 0), + onTap: (dynamic _) => setState(() => groupValue = 0), ), ASRadioButton( groupValue: groupValue, value: 1, title: '候选1', - onTap: (_) => setState(() => groupValue = 1), + onTap: (dynamic _) => setState(() => groupValue = 1), ), ASRadioButton( groupValue: groupValue, value: 2, title: '候选2', - onTap: (_) => setState(() => groupValue = 2), + onTap: (dynamic _) => setState(() => groupValue = 2), ), ASRadioButton( groupValue: groupValue, value: 3, title: '候选3', - onTap: (_) => setState(() => groupValue = 3), + onTap: (dynamic _) => setState(() => groupValue = 3), ), ], ), diff --git a/example/lib/widgets/example_chart.dart b/example/lib/widgets/example_chart.dart index 556bdb2..971c3f9 100644 --- a/example/lib/widgets/example_chart.dart +++ b/example/lib/widgets/example_chart.dart @@ -3,7 +3,7 @@ import 'package:ansu_ui/chart/circle_chart_widget.dart'; import 'package:flutter/material.dart'; class ExampleChart extends StatefulWidget { - const ExampleChart({Key key}) : super(key: key); + const ExampleChart({Key? key}) : super(key: key); @override _ExampleChartState createState() => _ExampleChartState(); diff --git a/example/lib/widgets/example_divider.dart b/example/lib/widgets/example_divider.dart index 800829a..997e1f1 100644 --- a/example/lib/widgets/example_divider.dart +++ b/example/lib/widgets/example_divider.dart @@ -3,7 +3,7 @@ import 'package:ansu_ui/divider/as_dotted_divider.dart'; import 'package:flutter/material.dart'; class ExampleDivider extends StatefulWidget { - ExampleDivider({Key key}) : super(key: key); + ExampleDivider({Key? key}) : super(key: key); @override _ExampleDividerState createState() => _ExampleDividerState(); diff --git a/example/lib/widgets/example_drawer.dart b/example/lib/widgets/example_drawer.dart index b43f32a..dc50226 100644 --- a/example/lib/widgets/example_drawer.dart +++ b/example/lib/widgets/example_drawer.dart @@ -2,7 +2,7 @@ import 'package:ansu_ui/ansu_ui.dart'; import 'package:flutter/material.dart'; class ExampleDrawer extends StatefulWidget { - ExampleDrawer({Key key}) : super(key: key); + ExampleDrawer({Key? key}) : super(key: key); @override _ExampleDrawerState createState() => _ExampleDrawerState(); diff --git a/example/lib/widgets/example_listtile.dart b/example/lib/widgets/example_listtile.dart index cb7b47b..b630eb6 100644 --- a/example/lib/widgets/example_listtile.dart +++ b/example/lib/widgets/example_listtile.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class ExampleListTile extends StatefulWidget { - ExampleListTile({Key key}) : super(key: key); + ExampleListTile({Key? key}) : super(key: key); @override _ExampleListTileState createState() => _ExampleListTileState(); diff --git a/example/lib/widgets/example_numeric_button.dart b/example/lib/widgets/example_numeric_button.dart index 13db3e1..83f94ed 100644 --- a/example/lib/widgets/example_numeric_button.dart +++ b/example/lib/widgets/example_numeric_button.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; class ExampleNumericButton extends StatefulWidget { - ExampleNumericButton({Key key}) : super(key: key); + ExampleNumericButton({Key? key}) : super(key: key); @override _ExampleNumericButtonState createState() => _ExampleNumericButtonState(); diff --git a/example/lib/widgets/example_picker.dart b/example/lib/widgets/example_picker.dart index 0379ea1..8702021 100644 --- a/example/lib/widgets/example_picker.dart +++ b/example/lib/widgets/example_picker.dart @@ -7,7 +7,7 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; class ExamplePicker extends StatefulWidget { - ExamplePicker({Key key}) : super(key: key); + ExamplePicker({Key? key}) : super(key: key); @override _ExamplePickerState createState() => _ExamplePickerState(); @@ -40,7 +40,7 @@ class _ExamplePickerState extends State { trailing: ASButton( title: '日期选择器', onPressed: () async { - DateTime date = await asDatePicker(context); + DateTime? date = await asDatePicker(context); Get.snackbar(date.toString(), 'MESSAGE'); }, ), @@ -75,8 +75,8 @@ class _ExamplePickerState extends State { trailing: ASButton( title: '图片选择器', onPressed: () async { - File file = await camView(context, title: '图片选择器'); - print(file.lengthSync()); + File? file = await camView(context, title: '图片选择器'); + print(file?.lengthSync()); }, ), ), @@ -86,7 +86,7 @@ class _ExamplePickerState extends State { trailing: ASButton( title: '图片选择器', onPressed: () async { - File file = await pickImageFile(); + File? file = await pickImageFile(); }, ), ), diff --git a/example/lib/widgets/example_pop_up_menu.dart b/example/lib/widgets/example_pop_up_menu.dart index dba4a58..ae54ccc 100644 --- a/example/lib/widgets/example_pop_up_menu.dart +++ b/example/lib/widgets/example_pop_up_menu.dart @@ -3,14 +3,14 @@ import 'package:flutter/material.dart'; import 'package:velocity_x/velocity_x.dart'; class ExamplePopUpMenu extends StatefulWidget { - ExamplePopUpMenu({Key key}) : super(key: key); + ExamplePopUpMenu({Key? key}) : super(key: key); @override _ExamplePopUpMenuState createState() => _ExamplePopUpMenuState(); } class _ExamplePopUpMenuState extends State { - int _value; + int? _value; @override Widget build(BuildContext context) { return ASScaffold( @@ -25,7 +25,7 @@ class _ExamplePopUpMenuState extends State { return TextButton( child: '$_value'.text.make(), onPressed: () async { - int result = await showASPopUpMenu( + int? result = await showASPopUpMenu( context: context, initValue: _value, items: List.generate( diff --git a/example/lib/widgets/example_refresh.dart b/example/lib/widgets/example_refresh.dart index 0051a18..56a3260 100644 --- a/example/lib/widgets/example_refresh.dart +++ b/example/lib/widgets/example_refresh.dart @@ -2,7 +2,7 @@ import 'package:ansu_ui/ansu_ui.dart'; import 'package:flutter/material.dart'; class ExampleRefresh extends StatefulWidget { - ExampleRefresh({Key key}) : super(key: key); + ExampleRefresh({Key? key}) : super(key: key); @override _ExampleRefreshState createState() => _ExampleRefreshState(); diff --git a/example/lib/widgets/example_scaffold.dart b/example/lib/widgets/example_scaffold.dart index 35303f1..64b5246 100644 --- a/example/lib/widgets/example_scaffold.dart +++ b/example/lib/widgets/example_scaffold.dart @@ -6,7 +6,7 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; class ExampleScaffold extends StatefulWidget { - ExampleScaffold({Key key}) : super(key: key); + ExampleScaffold({Key? key}) : super(key: key); @override _ExampleScaffoldState createState() => _ExampleScaffoldState(); @@ -14,15 +14,15 @@ class ExampleScaffold extends StatefulWidget { class _ExampleScaffoldState extends State with TickerProviderStateMixin { - TabController _tabController; - List tabs; + late TabController _tabController; + List? tabs; @override void initState() { super.initState(); tabs = List.generate(10, (index) => 'Tab $index'); _tabController = TabController( - length: tabs.length, + length: tabs!.length, vsync: this, ); } diff --git a/example/lib/widgets/example_style_color.dart b/example/lib/widgets/example_style_color.dart index 8ad6bc8..0fd64db 100644 --- a/example/lib/widgets/example_style_color.dart +++ b/example/lib/widgets/example_style_color.dart @@ -4,7 +4,7 @@ import 'package:ansu_ui/ansu_ui.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class ExampleStyleColor extends StatefulWidget { - ExampleStyleColor({Key key}) : super(key: key); + ExampleStyleColor({Key? key}) : super(key: key); @override _ExampleStyleColorState createState() => _ExampleStyleColorState(); @@ -26,7 +26,7 @@ class _ExampleStyleColorState extends State { ], ), ), - subtitle: Text(object.codeName), + subtitle: Text(object.codeName!), trailing: Card( color: object.color, child: SizedBox(height: 50.w, width: 50.w), diff --git a/example/lib/widgets/example_tab_bar.dart b/example/lib/widgets/example_tab_bar.dart index 14d343e..4f0671f 100644 --- a/example/lib/widgets/example_tab_bar.dart +++ b/example/lib/widgets/example_tab_bar.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; class ExampleTabBar extends StatefulWidget { - ExampleTabBar({Key key}) : super(key: key); + ExampleTabBar({Key? key}) : super(key: key); @override _ExampleTabBarState createState() => _ExampleTabBarState(); @@ -13,10 +13,10 @@ class ExampleTabBar extends StatefulWidget { class _ExampleTabBarState extends State with TickerProviderStateMixin { - TabController _tabController1; - TabController _tabController2; - TabController _tabController3; - TabController _tabController4; + TabController? _tabController1; + TabController? _tabController2; + TabController? _tabController3; + TabController? _tabController4; @override void initState() { super.initState(); @@ -58,23 +58,23 @@ class _ExampleTabBarState extends State // BEGIN tabBar ASTabBar( items: ['全部', 'Part1', 'Part2'], - controller: _tabController1, + controller: _tabController1!, ), ASTabBar( items: List.generate(5, (index) => 'Tab $index'), - controller: _tabController2, + controller: _tabController2!, ), ASTabBar( isScrollable: true, items: List.generate(10, (index) => 'Tab $index'), - controller: _tabController3, + controller: _tabController3!, ), ASTabBar.tag( isScrollable: true, tabItems: List.generate(10, (index) => 'Tab $index') .map((e) => ASTabBarItem(title: e, tag: e)) .toList(), - controller: _tabController4, + controller: _tabController4!, ), // END diff --git a/example/lib/widgets/example_tag.dart b/example/lib/widgets/example_tag.dart index ea6800e..9f97417 100644 --- a/example/lib/widgets/example_tag.dart +++ b/example/lib/widgets/example_tag.dart @@ -6,7 +6,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; class ExampleTag extends StatefulWidget { - ExampleTag({Key key}) : super(key: key); + ExampleTag({Key? key}) : super(key: key); @override _ExampaleTagState createState() => _ExampaleTagState(); diff --git a/example/lib/widgets/example_text_field.dart b/example/lib/widgets/example_text_field.dart index 54194bd..4ab7b63 100644 --- a/example/lib/widgets/example_text_field.dart +++ b/example/lib/widgets/example_text_field.dart @@ -2,14 +2,14 @@ import 'package:ansu_ui/ansu_ui.dart'; import 'package:flutter/material.dart'; class ExampleTextFiled extends StatefulWidget { - ExampleTextFiled({Key key}) : super(key: key); + ExampleTextFiled({Key? key}) : super(key: key); @override _ExampleTextFiledState createState() => _ExampleTextFiledState(); } class _ExampleTextFiledState extends State { - TextEditingController _controller; + TextEditingController? _controller; @override Widget build(BuildContext context) { return ASScaffold( diff --git a/example/lib/widgets/example_toast.dart b/example/lib/widgets/example_toast.dart index 72ec95e..79b34bb 100644 --- a/example/lib/widgets/example_toast.dart +++ b/example/lib/widgets/example_toast.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; import 'package:velocity_x/velocity_x.dart'; class ExampleToast extends StatelessWidget { - const ExampleToast({Key key}) : super(key: key); + const ExampleToast({Key? key}) : super(key: key); @override Widget build(BuildContext context) { diff --git a/example/pubspec.lock b/example/pubspec.lock index f805e34..5cdbb00 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -10,13 +10,6 @@ packages: url: "https://git.oa00.com/flutter_pub/animated_collection.git" source: git version: "0.0.1" - animator: - dependency: transitive - description: - name: animator - url: "https://pub.flutter-io.cn" - source: hosted - version: "3.0.0" ansu_ui: dependency: "direct main" description: @@ -28,86 +21,93 @@ packages: dependency: "direct main" description: name: args - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.2.0" async: dependency: transitive description: name: async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.5.0" + version: "2.8.2" auto_size_text_pk: dependency: transitive description: name: auto_size_text_pk - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.0" bot_toast: dependency: transitive description: name: bot_toast - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.0.1" characters: dependency: transitive description: name: characters - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" charcode: dependency: transitive description: name: charcode - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" cli_util: dependency: transitive description: name: cli_util - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.3.3" clock: dependency: transitive description: name: clock - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" collection: dependency: transitive description: name: collection - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.15.0" + cross_file: + dependency: transitive + description: + name: cross_file + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.1+4" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "1.0.2" + version: "1.0.3" expandable: dependency: transitive description: name: expandable - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "5.0.1" file: dependency: transitive description: name: file - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "6.1.0" + version: "6.1.2" flutter: dependency: "direct main" description: flutter @@ -117,7 +117,7 @@ packages: dependency: transitive description: name: flutter_easyrefresh - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.2.1" flutter_localizations: @@ -129,16 +129,16 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.2" flutter_screenutil: dependency: transitive description: name: flutter_screenutil - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "5.0.0" + version: "5.0.0+2" flutter_web_plugins: dependency: transitive description: flutter @@ -148,107 +148,107 @@ packages: dependency: "direct main" description: name: get - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "4.1.4" + version: "4.3.8" glob: dependency: transitive description: name: glob - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.1" grinder: dependency: "direct main" description: name: grinder - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.9.0" http: dependency: transitive description: name: http - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "0.13.1" + version: "0.13.3" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.0.0" image_picker: dependency: transitive description: name: image_picker - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "0.7.4" + version: "0.7.5+4" image_picker_for_web: dependency: transitive description: name: image_picker_for_web - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.3" image_picker_platform_interface: dependency: transitive description: name: image_picker_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.3.0" intl: dependency: transitive description: name: intl - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.17.0" js: dependency: transitive description: name: js - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.6.3" lpinyin: dependency: transitive description: name: lpinyin - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.3" meta: dependency: transitive description: name: meta - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0" path: dependency: transitive description: name: path - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.0" pedantic: dependency: transitive description: name: pedantic - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "1.11.0" + version: "1.11.1" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.1" sky_engine: dependency: transitive description: flutter @@ -258,58 +258,51 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.1" - states_rebuilder: - dependency: transitive - description: - name: states_rebuilder - url: "https://pub.flutter-io.cn" - source: hosted - version: "4.0.0+1" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" velocity_x: dependency: transitive description: name: velocity_x - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.6.1" + version: "3.3.0" vxstate: dependency: transitive description: name: vxstate - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.1.0" sdks: dart: ">=2.12.0 <3.0.0" flutter: ">=2.0.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 104325d..694d593 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -4,7 +4,7 @@ publish_to: "none" version: 1.0.0+1 environment: - sdk: ">=2.7.0 <3.0.0" + sdk: '>=2.12.0 <3.0.0' dependencies: flutter: @@ -17,7 +17,7 @@ dependencies: cupertino_icons: ^1.0.0 ansu_ui: path: ../ - get: + get: ^4.1.3 grinder: args: diff --git a/example/tool/codeviewer_cli/main.dart b/example/tool/codeviewer_cli/main.dart index f292289..619be0e 100644 --- a/example/tool/codeviewer_cli/main.dart +++ b/example/tool/codeviewer_cli/main.dart @@ -25,7 +25,7 @@ void main(List arguments) { writeSegments( sourceDirectoryPath: path.join(Directory.current.path, 'lib'), - targetFilePath: argResults['target'] as String, + targetFilePath: argResults['target'] as String?, isDryRun: argResults['dry-run'] as bool, ); } diff --git a/example/tool/codeviewer_cli/prehighlighter.dart b/example/tool/codeviewer_cli/prehighlighter.dart index df9bd6b..252a56f 100644 --- a/example/tool/codeviewer_cli/prehighlighter.dart +++ b/example/tool/codeviewer_cli/prehighlighter.dart @@ -76,15 +76,15 @@ class DartSyntaxPrehighlighter extends SyntaxPrehighlighter { 'bool', ]; - String _src; - StringScanner _scanner; + String? _src; + late StringScanner _scanner; - List<_HighlightSpan> _spans; + late List<_HighlightSpan> _spans; @override - List format(String src) { + List format(String? src) { _src = src; - _scanner = StringScanner(_src); + _scanner = StringScanner(_src!); if (_generateSpans()) { // Successfully parsed the code @@ -93,19 +93,19 @@ class DartSyntaxPrehighlighter extends SyntaxPrehighlighter { for (final span in _spans) { if (currentPosition != span.start) { - formattedText - .add(CodeSpan(text: _src.substring(currentPosition, span.start))); + formattedText.add( + CodeSpan(text: _src!.substring(currentPosition, span.start))); } formattedText - .add(CodeSpan(type: span.type, text: span.textForSpan(_src))); + .add(CodeSpan(type: span.type, text: span.textForSpan(_src!))); currentPosition = span.end; } - if (currentPosition != _src.length) { - formattedText - .add(CodeSpan(text: _src.substring(currentPosition, _src.length))); + if (currentPosition != _src!.length) { + formattedText.add( + CodeSpan(text: _src!.substring(currentPosition, _src!.length))); } return formattedText; @@ -126,23 +126,23 @@ class DartSyntaxPrehighlighter extends SyntaxPrehighlighter { if (_scanner.scan(RegExp(r'/\*(.|\n)*\*/'))) { _spans.add(_HighlightSpan( _HighlightType.comment, - _scanner.lastMatch.start, - _scanner.lastMatch.end, + _scanner.lastMatch!.start, + _scanner.lastMatch!.end, )); continue; } // Line comments if (_scanner.scan('//')) { - final startComment = _scanner.lastMatch.start; + final startComment = _scanner.lastMatch!.start; var eof = false; int endComment; if (_scanner.scan(RegExp(r'.*\n'))) { - endComment = _scanner.lastMatch.end - 1; + endComment = _scanner.lastMatch!.end - 1; } else { eof = true; - endComment = _src.length; + endComment = _src!.length; } _spans.add(_HighlightSpan( @@ -162,8 +162,8 @@ class DartSyntaxPrehighlighter extends SyntaxPrehighlighter { if (_scanner.scan(RegExp(r'r".*"'))) { _spans.add(_HighlightSpan( _HighlightType.string, - _scanner.lastMatch.start, - _scanner.lastMatch.end, + _scanner.lastMatch!.start, + _scanner.lastMatch!.end, )); continue; } @@ -172,8 +172,8 @@ class DartSyntaxPrehighlighter extends SyntaxPrehighlighter { if (_scanner.scan(RegExp(r"r'.*'"))) { _spans.add(_HighlightSpan( _HighlightType.string, - _scanner.lastMatch.start, - _scanner.lastMatch.end, + _scanner.lastMatch!.start, + _scanner.lastMatch!.end, )); continue; } @@ -182,8 +182,8 @@ class DartSyntaxPrehighlighter extends SyntaxPrehighlighter { if (_scanner.scan(RegExp(r'"""(?:[^"\\]|\\(.|\n))*"""'))) { _spans.add(_HighlightSpan( _HighlightType.string, - _scanner.lastMatch.start, - _scanner.lastMatch.end, + _scanner.lastMatch!.start, + _scanner.lastMatch!.end, )); continue; } @@ -192,8 +192,8 @@ class DartSyntaxPrehighlighter extends SyntaxPrehighlighter { if (_scanner.scan(RegExp(r"'''(?:[^'\\]|\\(.|\n))*'''"))) { _spans.add(_HighlightSpan( _HighlightType.string, - _scanner.lastMatch.start, - _scanner.lastMatch.end, + _scanner.lastMatch!.start, + _scanner.lastMatch!.end, )); continue; } @@ -202,8 +202,8 @@ class DartSyntaxPrehighlighter extends SyntaxPrehighlighter { if (_scanner.scan(RegExp(r'"(?:[^"\\]|\\.)*"'))) { _spans.add(_HighlightSpan( _HighlightType.string, - _scanner.lastMatch.start, - _scanner.lastMatch.end, + _scanner.lastMatch!.start, + _scanner.lastMatch!.end, )); continue; } @@ -212,8 +212,8 @@ class DartSyntaxPrehighlighter extends SyntaxPrehighlighter { if (_scanner.scan(RegExp(r"'(?:[^'\\]|\\.)*'"))) { _spans.add(_HighlightSpan( _HighlightType.string, - _scanner.lastMatch.start, - _scanner.lastMatch.end, + _scanner.lastMatch!.start, + _scanner.lastMatch!.end, )); continue; } @@ -222,8 +222,8 @@ class DartSyntaxPrehighlighter extends SyntaxPrehighlighter { if (_scanner.scan(RegExp(r'\d+\.\d+'))) { _spans.add(_HighlightSpan( _HighlightType.number, - _scanner.lastMatch.start, - _scanner.lastMatch.end, + _scanner.lastMatch!.start, + _scanner.lastMatch!.end, )); continue; } @@ -231,7 +231,7 @@ class DartSyntaxPrehighlighter extends SyntaxPrehighlighter { // Integer if (_scanner.scan(RegExp(r'\d+'))) { _spans.add(_HighlightSpan(_HighlightType.number, - _scanner.lastMatch.start, _scanner.lastMatch.end)); + _scanner.lastMatch!.start, _scanner.lastMatch!.end)); continue; } @@ -239,8 +239,8 @@ class DartSyntaxPrehighlighter extends SyntaxPrehighlighter { if (_scanner.scan(RegExp(r'[\[\]{}().!=<>&\|\?\+\-\*/%\^~;:,]'))) { _spans.add(_HighlightSpan( _HighlightType.punctuation, - _scanner.lastMatch.start, - _scanner.lastMatch.end, + _scanner.lastMatch!.start, + _scanner.lastMatch!.end, )); continue; } @@ -249,17 +249,17 @@ class DartSyntaxPrehighlighter extends SyntaxPrehighlighter { if (_scanner.scan(RegExp(r'@\w+'))) { _spans.add(_HighlightSpan( _HighlightType.keyword, - _scanner.lastMatch.start, - _scanner.lastMatch.end, + _scanner.lastMatch!.start, + _scanner.lastMatch!.end, )); continue; } // Words if (_scanner.scan(RegExp(r'\w+'))) { - _HighlightType type; + _HighlightType? type; - var word = _scanner.lastMatch[0]; + var word = _scanner.lastMatch![0]!; if (word.startsWith('_')) { word = word.substring(1); } @@ -279,8 +279,8 @@ class DartSyntaxPrehighlighter extends SyntaxPrehighlighter { if (type != null) { _spans.add(_HighlightSpan( type, - _scanner.lastMatch.start, - _scanner.lastMatch.end, + _scanner.lastMatch!.start, + _scanner.lastMatch!.end, )); } } @@ -346,13 +346,13 @@ class CodeSpan { CodeSpan({this.type = _HighlightType.base, this.text}); final _HighlightType type; - final String text; + final String? text; @override String toString() { return 'TextSpan(' 'style: codeStyle.${_styleNameOf(type)}, ' - "text: '${_escape(text)}'" + "text: '${_escape(text!)}'" ')'; } } @@ -376,7 +376,6 @@ String _styleNameOf(_HighlightType type) { case _HighlightType.base: return 'baseStyle'; } - return ''; } String _escape(String text) { @@ -409,4 +408,4 @@ String _encode(int charCode) { String _encodeAndPad(int charCode) { final encoded = _encode(charCode); return '0' * (4 - encoded.length) + encoded; -} \ No newline at end of file +} diff --git a/example/tool/codeviewer_cli/segment_generator.dart b/example/tool/codeviewer_cli/segment_generator.dart index e7bd35d..b45903d 100644 --- a/example/tool/codeviewer_cli/segment_generator.dart +++ b/example/tool/codeviewer_cli/segment_generator.dart @@ -4,6 +4,7 @@ import 'dart:convert'; import 'dart:io'; + import 'prehighlighter.dart'; const _globalPrologue = @@ -30,7 +31,7 @@ enum _FileReadStatus { /// Returns the new status of the scanner whose previous status was /// [oldStatus], after scanning the line [line]. -_FileReadStatus _updatedStatus(_FileReadStatus oldStatus, String line) { +_FileReadStatus? _updatedStatus(_FileReadStatus? oldStatus, String line) { _FileReadStatus lineStatus; if (line.trim().startsWith('//')) { lineStatus = _FileReadStatus.comments; @@ -40,7 +41,7 @@ _FileReadStatus _updatedStatus(_FileReadStatus oldStatus, String line) { lineStatus = _FileReadStatus.finished; } - _FileReadStatus newStatus; + _FileReadStatus? newStatus; switch (oldStatus) { case _FileReadStatus.comments: newStatus = @@ -56,6 +57,8 @@ _FileReadStatus _updatedStatus(_FileReadStatus oldStatus, String line) { case _FileReadStatus.finished: newStatus = oldStatus; break; + default: + newStatus = oldStatus; } return newStatus; } @@ -77,7 +80,7 @@ Map _createSegments(String sourceDirectoryPath) { final content = file.readAsStringSync(); final lines = const LineSplitter().convert(content); - var status = _FileReadStatus.comments; + _FileReadStatus? status = _FileReadStatus.comments; final prologue = StringBuffer(); @@ -135,7 +138,7 @@ Map _createSegments(String sourceDirectoryPath) { // Simple line. for (final name in activeSubsegments) { - subsegments[name].writeln(line); + subsegments[name]!.writeln(line); } } } @@ -146,7 +149,7 @@ Map _createSegments(String sourceDirectoryPath) { } var segments = >{}; - var segmentPrologues = {}; + var segmentPrologues = {}; // Sometimes a code segment is made up of subsegments. They are marked by // names with a "#" symbol in it, such as "bottomSheetDemoModal#1" and @@ -168,7 +171,7 @@ Map _createSegments(String sourceDirectoryPath) { if (!segments.containsKey(name)) { segments[name] = []; } - segments[name].add( + segments[name]!.add( TaggedString( text: value.toString(), order: order, @@ -179,7 +182,7 @@ Map _createSegments(String sourceDirectoryPath) { }); segments.forEach((key, value) { - value.sort((ts1, ts2) => (ts1.order - ts2.order).sign.round()); + value.sort((ts1, ts2) => (ts1.order! - ts2.order!).sign.round()); }); var answer = {}; @@ -187,11 +190,11 @@ Map _createSegments(String sourceDirectoryPath) { for (final name in segments.keys) { final buffer = StringBuffer(); - buffer.write(segmentPrologues[name].trim()); + buffer.write(segmentPrologues[name]!.trim()); buffer.write('\n\n'); - for (final ts in segments[name]) { - buffer.write(ts.text.trim()); + for (final ts in segments[name]!) { + buffer.write(ts.text!.trim()); buffer.write('\n\n'); } @@ -208,8 +211,8 @@ Map _createSegments(String sourceDirectoryPath) { class TaggedString { TaggedString({this.text, this.order}); - final String text; - final double order; + final String? text; + final double? order; } void _formatSegments(Map segments, IOSink output) { @@ -254,13 +257,15 @@ void _formatSegments(Map segments, IOSink output) { /// /// The target file is overwritten. void writeSegments( - {String sourceDirectoryPath, String targetFilePath, bool isDryRun}) { + {required String sourceDirectoryPath, + String? targetFilePath, + required bool isDryRun}) { final segments = _createSegments(sourceDirectoryPath); - final output = isDryRun ? stdout : File(targetFilePath).openWrite(); + final output = isDryRun ? stdout : File(targetFilePath!).openWrite(); _formatSegments(segments, output); } class PreformatterException implements Exception { PreformatterException(this.cause); String cause; -} \ No newline at end of file +} diff --git a/example/tool/grind.dart b/example/tool/grind.dart index cd2bc2f..825f1f2 100644 --- a/example/tool/grind.dart +++ b/example/tool/grind.dart @@ -63,7 +63,7 @@ Future _runProcess(String executable, List arguments) async { // Function to make sure we capture all of the stdout. // Reference: https://github.com/dart-lang/sdk/issues/31666 Future _startProcess(String executable, - {List arguments = const [], String input}) async { + {List arguments = const [], String? input}) async { final output = []; final completer = Completer(); final process = await Process.start(executable, arguments); diff --git a/pubspec.lock b/pubspec.lock index 347e0bd..f99489e 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -10,88 +10,81 @@ packages: url: "https://git.oa00.com/flutter_pub/animated_collection.git" source: git version: "0.0.1" - animator: - dependency: transitive - description: - name: animator - url: "https://pub.flutter-io.cn" - source: hosted - version: "3.1.0" async: dependency: transitive description: name: async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.5.0" auto_size_text_pk: dependency: transitive description: name: auto_size_text_pk - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" bot_toast: dependency: "direct main" description: name: bot_toast - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.0.1" characters: dependency: transitive description: name: characters - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" charcode: dependency: transitive description: name: charcode - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" clock: dependency: transitive description: name: clock - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" collection: dependency: transitive description: name: collection - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.15.0" cross_file: dependency: transitive description: name: cross_file - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.3.1+4" expandable: dependency: "direct main" description: name: expandable - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "5.0.1" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" flutter: @@ -103,21 +96,21 @@ packages: dependency: "direct main" description: name: flutter_easyrefresh - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.2.1" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.2" flutter_screenutil: dependency: "direct main" description: name: flutter_screenutil - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "5.0.0+2" flutter_test: @@ -134,98 +127,98 @@ packages: dependency: "direct main" description: name: get - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "4.1.4" + version: "4.3.8" http: dependency: transitive description: name: http - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.13.3" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.0.0" image_picker: dependency: "direct main" description: name: image_picker - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.7.5+4" image_picker_for_web: dependency: transitive description: name: image_picker_for_web - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.3" image_picker_platform_interface: dependency: transitive description: name: image_picker_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.2.0" + version: "2.3.0" intl: dependency: transitive description: name: intl - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.17.0" js: dependency: transitive description: name: js - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.6.3" lpinyin: dependency: "direct main" description: name: lpinyin - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.3" matcher: dependency: transitive description: name: matcher - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.12.10" meta: dependency: transitive description: name: meta - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0" path: dependency: transitive description: name: path - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.0" pedantic: dependency: transitive description: name: pedantic - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.11.1" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.1" sky_engine: @@ -237,77 +230,70 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.0" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.10.0" - states_rebuilder: - dependency: transitive - description: - name: states_rebuilder - url: "https://pub.flutter-io.cn" - source: hosted - version: "4.3.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" test_api: dependency: transitive description: name: test_api - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.2.19" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" velocity_x: dependency: "direct main" description: name: velocity_x - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.6.1" + version: "3.3.0" vxstate: dependency: transitive description: name: vxstate - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" sdks: diff --git a/pubspec.yaml b/pubspec.yaml index 2079115..f4fd850 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ dependencies: lpinyin: ^2.0.1 image_picker: ^0.7.2 bot_toast: ^4.0.0+1 - velocity_x: ^2.6.1 + velocity_x: ^3.3.0 expandable: ^5.0.1 animated_collection: git: