Apply super.key linting suggestions
This commit is contained in:
parent
b085d3bfb6
commit
83da62b5d9
|
@ -7,8 +7,8 @@ class DynamicColorScheme extends StatefulWidget {
|
|||
const DynamicColorScheme({
|
||||
required this.data,
|
||||
required this.builder,
|
||||
Key? key,
|
||||
}) : super(key: key);
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
createState() => _DynamicColorSchemeState();
|
||||
|
|
|
@ -27,12 +27,15 @@ class _EditGymSetPageState extends State<EditGymSetPage> {
|
|||
void initState() {
|
||||
super.initState();
|
||||
gymSet = widget.gymSet;
|
||||
print(gymSet);
|
||||
_nameController.text = gymSet.name.value;
|
||||
_repsController.text = gymSet.reps.value.toString();
|
||||
_weightController.text = gymSet.weight.value.toString();
|
||||
if (gymSet.id.present)
|
||||
if (gymSet.id.present) {
|
||||
repsNode.requestFocus();
|
||||
else
|
||||
_repsController.selection = TextSelection(
|
||||
baseOffset: 0, extentOffset: _repsController.text.length);
|
||||
} else
|
||||
nameNode.requestFocus();
|
||||
}
|
||||
|
||||
|
@ -120,7 +123,7 @@ class _EditGymSetPageState extends State<EditGymSetPage> {
|
|||
return;
|
||||
}
|
||||
if (gymSet.id.present)
|
||||
await db.update(db.gymSets).write(gymSet);
|
||||
await db.update(db.gymSets).replace(gymSet);
|
||||
else {
|
||||
await Permission.notification.request();
|
||||
await db.into(db.gymSets).insert(gymSet);
|
||||
|
|
|
@ -10,7 +10,7 @@ void main() {
|
|||
}
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
MyApp({Key? key}) : super(key: key);
|
||||
MyApp({super.key});
|
||||
|
||||
final navigatorKey = GlobalKey<NavigatorState>();
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ class PlansPage extends StatelessWidget {
|
|||
}
|
||||
|
||||
class _PlansPage extends StatefulWidget {
|
||||
const _PlansPage({Key? key, required this.search}) : super(key: key);
|
||||
const _PlansPage({super.key, required this.search});
|
||||
|
||||
final String search;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import 'package:moor_flutter/moor_flutter.dart';
|
|||
class SetList extends StatefulWidget {
|
||||
final String search;
|
||||
|
||||
const SetList({Key? key, required this.search}) : super(key: key);
|
||||
const SetList({super.key, required this.search});
|
||||
|
||||
@override
|
||||
createState() => _SetList();
|
||||
|
|
|
@ -26,7 +26,7 @@ class SettingsPage extends StatelessWidget {
|
|||
}
|
||||
|
||||
class _SettingsPage extends StatefulWidget {
|
||||
const _SettingsPage({Key? key, required this.search}) : super(key: key);
|
||||
const _SettingsPage({super.key, required this.search});
|
||||
|
||||
final String search;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user