From 7805b612eb8872c6d5d4f1537eaf181254875adb Mon Sep 17 00:00:00 2001 From: "hoc081098@gmail.com" Date: Thu, 20 Jun 2024 15:53:57 +0700 Subject: [PATCH] fix lints --- example/lib/main.dart | 18 +++++++++++------- example/test/widget_test.dart | 2 +- pubspec.yaml | 9 ++++++++- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index 72d3914..75bfadd 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -6,9 +6,11 @@ import 'package:flutter_disposebag/flutter_disposebag.dart'; import 'package:listenable_stream/listenable_stream.dart'; import 'package:rxdart_ext/state_stream.dart'; -void main() => runApp(MyApp()); +void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { + const MyApp({Key? key}) : super(key: key); + @override Widget build(BuildContext context) { return MaterialApp( @@ -26,18 +28,18 @@ class MyHomePage extends StatelessWidget { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text('listenable_stream example'), + title: const Text('listenable_stream example'), ), body: Center( child: ElevatedButton.icon( - label: Text('GO'), + label: const Text('GO'), onPressed: () { Navigator.push( context, - MaterialPageRoute(builder: (context) => MainPage()), + MaterialPageRoute(builder: (context) => const MainPage()), ); }, - icon: Icon(Icons.home), + icon: const Icon(Icons.home), ), ), ); @@ -45,8 +47,10 @@ class MyHomePage extends StatelessWidget { } class MainPage extends StatefulWidget { + const MainPage({Key? key}) : super(key: key); + @override - _MainPageState createState() => _MainPageState(); + State createState() => _MainPageState(); } class _MainPageState extends State with DisposeBagMixin { @@ -79,7 +83,7 @@ class _MainPageState extends State with DisposeBagMixin { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text('Main'), + title: const Text('Main'), ), body: Padding( padding: const EdgeInsets.all(8.0), diff --git a/example/test/widget_test.dart b/example/test/widget_test.dart index 747db1d..a19dabb 100644 --- a/example/test/widget_test.dart +++ b/example/test/widget_test.dart @@ -13,7 +13,7 @@ import 'package:example/main.dart'; void main() { testWidgets('Counter increments smoke test', (WidgetTester tester) async { // Build our app and trigger a frame. - await tester.pumpWidget(MyApp()); + await tester.pumpWidget(const MyApp()); // Verify that our counter starts at 0. expect(find.text('0'), findsOneWidget); diff --git a/pubspec.yaml b/pubspec.yaml index 52c5a5b..3820725 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,6 +4,8 @@ version: 1.1.0 homepage: https://github.com/Flutter-Dart-Open-Source/listenable_stream.git repository: https://github.com/Flutter-Dart-Open-Source/listenable_stream.git issue_tracker: https://github.com/Flutter-Dart-Open-Source/listenable_stream/issues +funding: + - https://www.buymeacoffee.com/hoc081098 environment: sdk: '>=3.0.0 <4.0.0' @@ -19,4 +21,9 @@ dev_dependencies: flutter_test: sdk: flutter -flutter: +topics: + - rxdart + - hoc081098 + - reactive-programming + - bloc + - state-management \ No newline at end of file