diff --git a/lib/main.dart b/lib/main.dart index 2f25835..9e056d5 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -8,15 +8,17 @@ import 'package:dash/utils/dbhelper_sqflite.dart'; import 'package:dash/models/car.dart'; import 'package:dash/models/txn.dart'; import 'package:dash/screens/screens.dart'; +import 'package:dash/theme.dart'; // import 'package:flutter/src/widgets/form.dart'; void main() async { runApp( ChangeNotifierProvider( create: (context) => GarageModel(), - child: const MaterialApp( + child: MaterialApp( title: 'Dashboard', home: MyApp(), + theme: appTheme, /* initialRoute: '/', routes: { '/': (context) => const MyApp(), diff --git a/lib/screens/car_detail.dart b/lib/screens/car_detail.dart index 4bde9a6..4023ff2 100644 --- a/lib/screens/car_detail.dart +++ b/lib/screens/car_detail.dart @@ -5,6 +5,7 @@ import 'package:dash/utils/garage_model.dart'; // import 'package:dash/main.dart'; import 'package:dash/models/car.dart'; import 'package:dash/screens/screens.dart'; +import 'package:google_fonts/google_fonts.dart'; class CarDetailScreen extends StatefulWidget { const CarDetailScreen({super.key, required this.carIndex}); @@ -38,7 +39,7 @@ class _CarDetailScreenState extends State { mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ Center( - // edit car screen + // edit car child: Ink( decoration: const ShapeDecoration( color: Colors.lightBlue, shape: CircleBorder()), @@ -61,8 +62,19 @@ class _CarDetailScreenState extends State { Consumer( builder: (context, garage, child) => Column( children: [ - Text("Nickname: ${garage.cars[widget.carIndex].nickname}"), - Text("VIN: ${garage.cars[widget.carIndex].vin}"), + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Text("${garage.cars[widget.carIndex].nickname}"), + ]), + Text( + "Nickname: ${garage.cars[widget.carIndex].nickname}", + style: GoogleFonts.crimsonPro(), + ), + Text( + "VIN: ${garage.cars[widget.carIndex].vin}", + style: GoogleFonts.crimsonPro(), + ), Text("License Plate: ${garage.cars[widget.carIndex].plate}"), Text( "Mileage: ${garage.cars[widget.carIndex].mileage.toString()}"), diff --git a/lib/screens/car_edit.dart b/lib/screens/car_edit.dart index 27bbded..b57b6e4 100644 --- a/lib/screens/car_edit.dart +++ b/lib/screens/car_edit.dart @@ -105,7 +105,10 @@ class _EditCarScreenState extends State { leading: CircleAvatar( backgroundImage: AssetImage(car.icon ?? selectedIcon), backgroundColor: Colors.white), - title: const Text("Change Icon"), + title: Text( + "Change Icon", + style: TextStyle(color: Colors.grey[700], fontSize: 14), + ), onTap: () => showDialog( barrierColor: Colors.black.withOpacity(.5), context: context, @@ -113,7 +116,6 @@ class _EditCarScreenState extends State { return ip; }).then((value) => setState( () { - // selectedIcon = ip.selectedIcon; selectedIcon = value; }, ))), diff --git a/lib/screens/car_new.dart b/lib/screens/car_new.dart index 2589ae1..c3c7293 100644 --- a/lib/screens/car_new.dart +++ b/lib/screens/car_new.dart @@ -86,7 +86,10 @@ class _NewCarScreenState extends State { leading: CircleAvatar( backgroundImage: AssetImage(selectedIcon), backgroundColor: Colors.white), - title: const Text("Change Icon"), + title: Text( + "Change Icon", + style: TextStyle(color: Colors.grey[700], fontSize: 14), + ), onTap: () => showDialog( barrierColor: Colors.black.withOpacity(.5), context: context, diff --git a/lib/theme.dart b/lib/theme.dart new file mode 100644 index 0000000..1299987 --- /dev/null +++ b/lib/theme.dart @@ -0,0 +1,12 @@ +import 'package:flutter/material.dart'; + +var appTheme = ThemeData( + brightness: Brightness.light, + // textTheme: const TextTheme( + // bodyText1: TextStyle(fontSize: 18), + // button: TextStyle( + // letterSpacing: 1.5, + // fontWeight: FontWeight.bold, + // ), + // ), +); diff --git a/pubspec.lock b/pubspec.lock index 112bda0..796dd1d 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -36,6 +36,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.16.0" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.2" cupertino_icons: dependency: "direct main" description: @@ -81,6 +88,27 @@ packages: description: flutter source: sdk version: "0.0.0" + google_fonts: + dependency: "direct main" + description: + name: google_fonts + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.5" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.2" lints: dependency: transitive description: @@ -268,6 +296,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.4.12" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.1" vector_math: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index fa8248f..d50b6d5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: dash -description: A new Flutter project. +description: Keep track of your car stuff. # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. @@ -36,7 +36,7 @@ dependencies: sqflite: any path: path_provider: ^2.0.11 - + google_fonts: ^3.0.1 # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons.