mirror of https://github.com/AMT-Cheif/drift.git
Fix analysis warnings in `drift_sqflite` example
This commit is contained in:
parent
fb64c7404f
commit
ece91869f6
|
@ -1,5 +1,4 @@
|
|||
import 'package:example/database/database.dart';
|
||||
import 'package:drift_sqflite/drift_sqflite.dart';
|
||||
import 'package:drift/drift.dart';
|
||||
import 'package:rxdart/rxdart.dart';
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ class MyApp extends StatelessWidget {
|
|||
primarySwatch: Colors.orange,
|
||||
typography: Typography.material2018(),
|
||||
),
|
||||
home: HomeScreen(),
|
||||
home: const HomeScreen(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -3,6 +3,8 @@ import 'package:example/bloc.dart';
|
|||
import 'package:provider/provider.dart';
|
||||
|
||||
class AddCategoryDialog extends StatefulWidget {
|
||||
const AddCategoryDialog({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_AddCategoryDialogState createState() => _AddCategoryDialogState();
|
||||
}
|
||||
|
|
|
@ -49,7 +49,8 @@ class CategoriesDrawer extends StatelessWidget {
|
|||
),
|
||||
onPressed: () {
|
||||
showDialog(
|
||||
context: context, builder: (_) => AddCategoryDialog());
|
||||
context: context,
|
||||
builder: (_) => const AddCategoryDialog());
|
||||
},
|
||||
),
|
||||
],
|
||||
|
|
|
@ -9,6 +9,8 @@ import 'package:provider/provider.dart';
|
|||
// ignore_for_file: prefer_const_constructors
|
||||
|
||||
class HomeScreen extends StatefulWidget {
|
||||
const HomeScreen({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
HomeScreenState createState() {
|
||||
return HomeScreenState();
|
||||
|
@ -33,7 +35,7 @@ class HomeScreenState extends State<HomeScreen> {
|
|||
body: StreamBuilder<List<EntryWithCategory>>(
|
||||
stream: bloc.homeScreenEntries,
|
||||
builder: (context, snapshot) {
|
||||
print(snapshot);
|
||||
debugPrint(snapshot.toString());
|
||||
|
||||
if (!snapshot.hasData) {
|
||||
return const Align(
|
||||
|
|
Loading…
Reference in New Issue