big refactor #1
This commit is contained in:
@ -6,16 +6,31 @@ import 'package:sendtrain/screens/activities_screen.dart';
|
||||
import 'package:sendtrain/screens/sessions_screen.dart';
|
||||
// ignore: unused_import
|
||||
import 'package:sendtrain/database/seed.dart';
|
||||
import 'package:sendtrain/widgets/session_creator.dart';
|
||||
import 'package:sendtrain/widgets/sessions/session_creator.dart';
|
||||
|
||||
class SendTrain extends StatelessWidget {
|
||||
const SendTrain({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final ThemeData themeData = ThemeData.dark(useMaterial3: true);
|
||||
return MaterialApp(
|
||||
title: "Sendtrain",
|
||||
theme: ThemeData.dark(useMaterial3: true),
|
||||
theme: themeData.copyWith(
|
||||
filledButtonTheme: FilledButtonThemeData(
|
||||
style: FilledButton.styleFrom(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
),
|
||||
),
|
||||
floatingActionButtonTheme: FloatingActionButtonThemeData(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12))),
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
fillColor: themeData.colorScheme.surface,
|
||||
),
|
||||
),
|
||||
home: const App());
|
||||
}
|
||||
}
|
||||
@ -84,16 +99,18 @@ class _AppState extends State<App> {
|
||||
]),
|
||||
floatingActionButton: FloatingActionButton.extended(
|
||||
onPressed: () {
|
||||
showAdaptiveDialog(
|
||||
barrierColor: Colors.black.withOpacity(0.5),
|
||||
builder: (BuildContext context) => SessionCreator(),
|
||||
barrierDismissible: true,
|
||||
barrierLabel: '',
|
||||
context: context);
|
||||
showModalBottomSheet<void>(
|
||||
context: context,
|
||||
showDragHandle: true,
|
||||
isScrollControlled: true,
|
||||
useSafeArea: true,
|
||||
builder: (BuildContext context) {
|
||||
return SessionCreator();
|
||||
});
|
||||
},
|
||||
label: const Text('New Session'),
|
||||
icon: const Icon(Icons.add_chart),
|
||||
backgroundColor: Colors.deepPurple,
|
||||
// backgroundColor: Colors.deepPurple,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user