Skip to content

Commit

Permalink
fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
hoc081098 committed Jun 20, 2024
1 parent b069614 commit 7805b61
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
18 changes: 11 additions & 7 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -26,27 +28,29 @@ 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),
),
),
);
}
}

class MainPage extends StatefulWidget {
const MainPage({Key? key}) : super(key: key);

@override
_MainPageState createState() => _MainPageState();
State<MainPage> createState() => _MainPageState();
}

class _MainPageState extends State<MainPage> with DisposeBagMixin {
Expand Down Expand Up @@ -79,7 +83,7 @@ class _MainPageState extends State<MainPage> 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),
Expand Down
2 changes: 1 addition & 1 deletion example/test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
9 changes: 8 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -19,4 +21,9 @@ dev_dependencies:
flutter_test:
sdk: flutter

flutter:
topics:
- rxdart
- hoc081098
- reactive-programming
- bloc
- state-management

0 comments on commit 7805b61

Please sign in to comment.