From 022036065098d3c79f75a4fe331e77dc6e236d40 Mon Sep 17 00:00:00 2001 From: Tatiana Sugina Date: Wed, 27 Mar 2024 14:53:07 +0300 Subject: [PATCH] feat: dart format --- example/lib/screens/main_page.dart | 5 +++-- lib/src/cupertino_swipe_refresh.dart | 7 ++++--- lib/src/material_swipe_refresh.dart | 11 ++++++----- lib/src/swipe_refresh.dart | 11 ++++++----- lib/src/swipe_refresh_base.dart | 5 +++-- test/swipe_refresh_builder_test.dart | 2 +- test/swipe_refresh_material_test.dart | 3 ++- 7 files changed, 25 insertions(+), 19 deletions(-) diff --git a/example/lib/screens/main_page.dart b/example/lib/screens/main_page.dart index 4a7a05a..711de08 100644 --- a/example/lib/screens/main_page.dart +++ b/example/lib/screens/main_page.dart @@ -131,7 +131,6 @@ class _ExampleBodyWidget extends StatelessWidget { final SwipeRefreshStyle style; - @override Widget build(BuildContext context) { return Container( @@ -139,7 +138,9 @@ class _ExampleBodyWidget extends StatelessWidget { height: 100, child: Center( child: Text( - style == SwipeRefreshStyle.material ? 'Material example' : 'Cupertino example', + style == SwipeRefreshStyle.material + ? 'Material example' + : 'Cupertino example', style: const TextStyle(color: white), ), ), diff --git a/lib/src/cupertino_swipe_refresh.dart b/lib/src/cupertino_swipe_refresh.dart index 3d6378d..2d843b9 100644 --- a/lib/src/cupertino_swipe_refresh.dart +++ b/lib/src/cupertino_swipe_refresh.dart @@ -83,7 +83,8 @@ class CupertinoSwipeRefresh extends SwipeRefreshBase { SwipeRefreshBaseState createState() => _CupertinoSwipeRefreshState(); } -class _CupertinoSwipeRefreshState extends SwipeRefreshBaseState { +class _CupertinoSwipeRefreshState + extends SwipeRefreshBaseState { late final ScrollController _scrollController; @override @@ -102,8 +103,8 @@ class _CupertinoSwipeRefreshState extends SwipeRefreshBaseState _MaterialSwipeRefreshState(); } -class _MaterialSwipeRefreshState extends SwipeRefreshBaseState { +class _MaterialSwipeRefreshState + extends SwipeRefreshBaseState { @override Widget buildRefresher( Key key, @@ -107,8 +108,8 @@ class _MaterialSwipeRefreshState extends SwipeRefreshBaseState extends State { +abstract class SwipeRefreshBaseState + extends State { @protected final GlobalKey refreshKey = GlobalKey(); @@ -79,7 +80,7 @@ abstract class SwipeRefreshBaseState extends State