diff --git a/moor/lib/src/dsl/table.dart b/moor/lib/src/dsl/table.dart index 7859907c..4e53965b 100644 --- a/moor/lib/src/dsl/table.dart +++ b/moor/lib/src/dsl/table.dart @@ -58,7 +58,6 @@ abstract class Table extends HasResultSet { /// See also: /// - https://www.sqlite.org/syntax/table-constraint.html, which defines what /// table constraints are supported. - @visibleForOverriding List get customConstraints => []; /// Use this as the body of a getter to declare a column that holds integers. diff --git a/moor/lib/src/runtime/executor/transactions.dart b/moor/lib/src/runtime/executor/transactions.dart index f31cd325..9cc55510 100644 --- a/moor/lib/src/runtime/executor/transactions.dart +++ b/moor/lib/src/runtime/executor/transactions.dart @@ -8,6 +8,7 @@ class Transaction extends DatabaseConnectionUser { final DatabaseConnectionUser _parent; @override + // ignore: invalid_use_of_visible_for_overriding_member GeneratedDatabase get attachedDatabase => _parent.attachedDatabase; /// Constructs a transaction executor from the [_parent] engine and the @@ -92,6 +93,7 @@ class BeforeOpenRunner extends DatabaseConnectionUser { final DatabaseConnectionUser _parent; @override + // ignore: invalid_use_of_visible_for_overriding_member GeneratedDatabase get attachedDatabase => _parent.attachedDatabase; /// Creates a [BeforeOpenRunner] from a [DatabaseConnectionUser] and the diff --git a/moor_flutter/example/lib/widgets/add_category_dialog.dart b/moor_flutter/example/lib/widgets/add_category_dialog.dart index 5383b9d3..fa72146b 100644 --- a/moor_flutter/example/lib/widgets/add_category_dialog.dart +++ b/moor_flutter/example/lib/widgets/add_category_dialog.dart @@ -35,9 +35,13 @@ class _AddCategoryDialogState extends State { ), ButtonBar( children: [ - FlatButton( + TextButton( child: const Text('Add'), - textColor: Theme.of(context).accentColor, + style: ButtonStyle( + foregroundColor: MaterialStateProperty.all( + Theme.of(context).colorScheme.secondary, + ), + ), onPressed: _addEntry, ), ], diff --git a/moor_flutter/example/lib/widgets/categories_drawer.dart b/moor_flutter/example/lib/widgets/categories_drawer.dart index 3cd27053..dc67ccca 100644 --- a/moor_flutter/example/lib/widgets/categories_drawer.dart +++ b/moor_flutter/example/lib/widgets/categories_drawer.dart @@ -38,9 +38,13 @@ class CategoriesDrawer extends StatelessWidget { const Spacer(), Row( children: [ - FlatButton( + TextButton( child: const Text('Add category'), - textColor: Theme.of(context).accentColor, + style: ButtonStyle( + foregroundColor: MaterialStateProperty.all( + Theme.of(context).colorScheme.secondary, + ), + ), onPressed: () { showDialog( context: context, builder: (_) => AddCategoryDialog()); @@ -77,7 +81,8 @@ class _CategoryDrawerEntry extends StatelessWidget { title, style: TextStyle( fontWeight: FontWeight.bold, - color: isActive ? Theme.of(context).accentColor : Colors.black, + color: + isActive ? Theme.of(context).colorScheme.secondary : Colors.black, ), ), Padding( @@ -107,9 +112,11 @@ class _CategoryDrawerEntry extends StatelessWidget { Navigator.pop(context, false); }, ), - FlatButton( + TextButton( child: const Text('Delete'), - textColor: Colors.red, + style: ButtonStyle( + foregroundColor: MaterialStateProperty.all(Colors.red), + ), onPressed: () { Navigator.pop(context, true); }, diff --git a/moor_flutter/example/lib/widgets/homescreen.dart b/moor_flutter/example/lib/widgets/homescreen.dart index bbd693be..da4f4595 100644 --- a/moor_flutter/example/lib/widgets/homescreen.dart +++ b/moor_flutter/example/lib/widgets/homescreen.dart @@ -72,7 +72,7 @@ class HomeScreenState extends State { ), IconButton( icon: Icon(Icons.send), - color: Theme.of(context).accentColor, + color: Theme.of(context).colorScheme.secondary, onPressed: _createTodoEntry, ), ], diff --git a/moor_flutter/example/lib/widgets/todo_card.dart b/moor_flutter/example/lib/widgets/todo_card.dart index 9b66dd98..97d522b3 100644 --- a/moor_flutter/example/lib/widgets/todo_card.dart +++ b/moor_flutter/example/lib/widgets/todo_card.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; +import 'package:intl/intl.dart'; import 'package:moor_example/bloc.dart'; import 'package:moor_example/database/database.dart'; -import 'package:intl/intl.dart'; import 'package:moor_example/widgets/todo_edit_dialog.dart'; import 'package:provider/provider.dart'; diff --git a/moor_flutter/example/lib/widgets/todo_edit_dialog.dart b/moor_flutter/example/lib/widgets/todo_edit_dialog.dart index 661d85ba..2ee03864 100644 --- a/moor_flutter/example/lib/widgets/todo_edit_dialog.dart +++ b/moor_flutter/example/lib/widgets/todo_edit_dialog.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; +import 'package:intl/intl.dart'; import 'package:moor_example/bloc.dart'; import 'package:moor_example/database/database.dart'; -import 'package:intl/intl.dart'; import 'package:provider/provider.dart'; final _dateFormat = DateFormat.yMMMd(); @@ -80,14 +80,18 @@ class _TodoEditDialogState extends State { ], ), actions: [ - FlatButton( + TextButton( child: const Text('Cancel'), - textColor: Colors.black, + style: ButtonStyle( + textStyle: MaterialStateProperty.all( + const TextStyle(color: Colors.black), + ), + ), onPressed: () { Navigator.pop(context); }, ), - FlatButton( + TextButton( child: const Text('Save'), onPressed: () { final updatedContent = textController.text;