Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Dart/Flutter. Added Windows build #106

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions best_flutter_ui_templates/.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,27 @@
# This file should be version controlled and should not be manually edited.

version:
revision: e6b34c2b5c96bb95325269a29a84e83ed8909b5f
channel: stable
revision: "ba393198430278b6595976de84fe170f553cc728"
channel: "stable"

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: ba393198430278b6595976de84fe170f553cc728
base_revision: ba393198430278b6595976de84fe170f553cc728
- platform: windows
create_revision: ba393198430278b6595976de84fe170f553cc728
base_revision: ba393198430278b6595976de84fe170f553cc728

# User provided section

# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
28 changes: 28 additions & 0 deletions best_flutter_ui_templates/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.

# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
# include: package:flutter_lints/flutter.yaml

linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at https://dart.dev/lints.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
36 changes: 21 additions & 15 deletions best_flutter_ui_templates/lib/app_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@ class AppTheme {
static const String fontName = 'WorkSans';

static const TextTheme textTheme = TextTheme(
headline4: display1,
headline5: headline,
headline6: title,
subtitle2: subtitle,
bodyText2: body2,
bodyText1: body1,
caption: caption,
headlineMedium: display1,
headlineSmall: headline,
titleLarge: title,
titleSmall: subtitle,
bodyMedium: body2,
bodyLarge: body1,
bodySmall: caption,
);

static const TextStyle display1 = TextStyle( // h4 -> display1
static const TextStyle display1 = TextStyle(
// h4 -> display1
fontFamily: fontName,
fontWeight: FontWeight.bold,
fontSize: 36,
Expand All @@ -38,52 +39,57 @@ class AppTheme {
color: darkerText,
);

static const TextStyle headline = TextStyle( // h5 -> headline
static const TextStyle headline = TextStyle(
// h5 -> headline
fontFamily: fontName,
fontWeight: FontWeight.bold,
fontSize: 24,
letterSpacing: 0.27,
color: darkerText,
);

static const TextStyle title = TextStyle( // h6 -> title
static const TextStyle title = TextStyle(
// h6 -> title
fontFamily: fontName,
fontWeight: FontWeight.bold,
fontSize: 16,
letterSpacing: 0.18,
color: darkerText,
);

static const TextStyle subtitle = TextStyle( // subtitle2 -> subtitle
static const TextStyle subtitle = TextStyle(
// subtitle2 -> subtitle
fontFamily: fontName,
fontWeight: FontWeight.w400,
fontSize: 14,
letterSpacing: -0.04,
color: darkText,
);

static const TextStyle body2 = TextStyle( // body1 -> body2
static const TextStyle body2 = TextStyle(
// body1 -> body2
fontFamily: fontName,
fontWeight: FontWeight.w400,
fontSize: 14,
letterSpacing: 0.2,
color: darkText,
);

static const TextStyle body1 = TextStyle( // body2 -> body1
static const TextStyle body1 = TextStyle(
// body2 -> body1
fontFamily: fontName,
fontWeight: FontWeight.w400,
fontSize: 16,
letterSpacing: -0.05,
color: darkText,
);

static const TextStyle caption = TextStyle( // Caption -> caption
static const TextStyle caption = TextStyle(
// Caption -> caption
fontFamily: fontName,
fontWeight: FontWeight.w400,
fontSize: 12,
letterSpacing: 0.2,
color: lightText, // was lightText
);

}
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ class DesignCourseAppTheme {
static const Color spacer = Color(0xFFF2F2F2);

static const TextTheme textTheme = TextTheme(
headline4: display1,
headline5: headline,
headline6: title,
subtitle2: subtitle,
bodyText1: body2,
bodyText2: body1,
caption: caption,
headlineMedium: display1,
headlineSmall: headline,
titleLarge: title,
titleSmall: subtitle,
bodyLarge: body2,
bodyMedium: body1,
bodySmall: caption,
);

static const TextStyle display1 = TextStyle(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import 'package:best_flutter_ui_templates/fitness_app/models/tabIcon_data.dart';
import 'package:best_flutter_ui_templates/main.dart';
import 'package:flutter/material.dart';

import '../../main.dart';
import '../models/tabIcon_data.dart';

class BottomBarView extends StatefulWidget {
const BottomBarView(
{Key? key, this.tabIconsList, this.changeIndex, this.addClick})
Expand Down
14 changes: 7 additions & 7 deletions best_flutter_ui_templates/lib/fitness_app/fitness_app_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ class FitnessAppTheme {
static const String fontName = 'Roboto';

static const TextTheme textTheme = TextTheme(
headline4: display1,
headline5: headline,
headline6: title,
subtitle2: subtitle,
bodyText2: body2,
bodyText1: body1,
caption: caption,
headlineMedium: display1,
headlineSmall: headline,
titleLarge: title,
titleSmall: subtitle,
bodyMedium: body2,
bodyLarge: body1,
bodySmall: caption,
);

static const TextStyle display1 = TextStyle(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import 'package:best_flutter_ui_templates/fitness_app/models/meals_list_data.dar
import 'package:best_flutter_ui_templates/main.dart';
import 'package:flutter/material.dart';

import '../../main.dart';

class MealsListView extends StatefulWidget {
const MealsListView(
{Key? key, this.mainScreenAnimationController, this.mainScreenAnimation})
Expand Down Expand Up @@ -223,7 +221,8 @@ class MealsView extends StatelessWidget {
padding: const EdgeInsets.all(6.0),
child: Icon(
Icons.add,
color: HexColor(mealsListData!.endColor),
color:
HexColor(mealsListData!.endColor),
size: 24,
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,8 @@ class MediterranesnDietView extends StatelessWidget {
child: Row(
children: <Widget>[
Container(
width: ((70 / 1.2) * animation!.value),
width:
((70 / 1.2) * animation!.value),
height: 4,
decoration: BoxDecoration(
gradient: LinearGradient(colors: [
Expand Down Expand Up @@ -569,6 +570,7 @@ class MediterranesnDietView extends StatelessWidget {
}
}

// Very cool Curve Painter Brian. This is to the right of the Kcal left
class CurvePainter extends CustomPainter {
final double? angle;
final List<Color>? colors;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class TitleView extends StatelessWidget {

const TitleView(
{Key? key,
this.titleTxt: "",
this.subTxt: "",
this.titleTxt = "",
this.subTxt = "",
this.animationController,
this.animation})
: super(key: key);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ class _CalendarPopupViewState extends State<CalendarPopupView>
padding: const EdgeInsets.all(24.0),
child: Container(
decoration: BoxDecoration(
color: HotelAppTheme.buildLightTheme().backgroundColor,
color: HotelAppTheme.buildLightTheme()
.colorScheme
.background,
borderRadius:
const BorderRadius.all(Radius.circular(24.0)),
boxShadow: <BoxShadow>[
Expand Down Expand Up @@ -214,7 +216,8 @@ class _CalendarPopupViewState extends State<CalendarPopupView>
// animationController.reverse().then((f) {

// });
widget.onApplyClick!(startDate!, endDate!);
widget.onApplyClick!(
startDate!, endDate!);
Navigator.pop(context);
} catch (_) {}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class _FiltersScreenState extends State<FiltersScreen> {
@override
Widget build(BuildContext context) {
return Container(
color: HotelAppTheme.buildLightTheme().backgroundColor,
color: HotelAppTheme.buildLightTheme().colorScheme.background,
child: Scaffold(
backgroundColor: Colors.transparent,
body: Column(
Expand Down Expand Up @@ -366,7 +366,7 @@ class _FiltersScreenState extends State<FiltersScreen> {
Widget getAppBarUI() {
return Container(
decoration: BoxDecoration(
color: HotelAppTheme.buildLightTheme().backgroundColor,
color: HotelAppTheme.buildLightTheme().colorScheme.background,
boxShadow: <BoxShadow>[
BoxShadow(
color: Colors.grey.withOpacity(0.2),
Expand Down
32 changes: 16 additions & 16 deletions best_flutter_ui_templates/lib/hotel_booking/hotel_app_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ class HotelAppTheme {
static TextTheme _buildTextTheme(TextTheme base) {
const String fontName = 'WorkSans';
return base.copyWith(
headline1: base.headline1?.copyWith(fontFamily: fontName),
headline2: base.headline2?.copyWith(fontFamily: fontName),
headline3: base.headline3?.copyWith(fontFamily: fontName),
headline4: base.headline4?.copyWith(fontFamily: fontName),
headline5: base.headline5?.copyWith(fontFamily: fontName),
headline6: base.headline6?.copyWith(fontFamily: fontName),
button: base.button?.copyWith(fontFamily: fontName),
caption: base.caption?.copyWith(fontFamily: fontName),
bodyText1: base.bodyText1?.copyWith(fontFamily: fontName),
bodyText2: base.bodyText2?.copyWith(fontFamily: fontName),
subtitle1: base.subtitle1?.copyWith(fontFamily: fontName),
subtitle2: base.subtitle2?.copyWith(fontFamily: fontName),
overline: base.overline?.copyWith(fontFamily: fontName),
displayLarge: base.displayLarge?.copyWith(fontFamily: fontName),
displayMedium: base.displayMedium?.copyWith(fontFamily: fontName),
displaySmall: base.displaySmall?.copyWith(fontFamily: fontName),
headlineMedium: base.headlineMedium?.copyWith(fontFamily: fontName),
headlineSmall: base.headlineSmall?.copyWith(fontFamily: fontName),
titleLarge: base.titleLarge?.copyWith(fontFamily: fontName),
labelLarge: base.labelLarge?.copyWith(fontFamily: fontName),
bodySmall: base.bodySmall?.copyWith(fontFamily: fontName),
bodyLarge: base.bodyLarge?.copyWith(fontFamily: fontName),
bodyMedium: base.bodyMedium?.copyWith(fontFamily: fontName),
titleMedium: base.titleMedium?.copyWith(fontFamily: fontName),
titleSmall: base.titleSmall?.copyWith(fontFamily: fontName),
labelSmall: base.labelSmall?.copyWith(fontFamily: fontName),
);
}

Expand All @@ -30,22 +30,22 @@ class HotelAppTheme {
);
final ThemeData base = ThemeData.light();
return base.copyWith(
colorScheme: colorScheme,
primaryColor: primaryColor,
indicatorColor: Colors.white,
splashColor: Colors.white24,
splashFactory: InkRipple.splashFactory,
canvasColor: Colors.white,
backgroundColor: const Color(0xFFFFFFFF),
scaffoldBackgroundColor: const Color(0xFFF6F6F6),
errorColor: const Color(0xFFB00020),
buttonTheme: ButtonThemeData(
colorScheme: colorScheme,
textTheme: ButtonTextTheme.primary,
),
textTheme: _buildTextTheme(base.textTheme),
primaryTextTheme: _buildTextTheme(base.primaryTextTheme),
platform: TargetPlatform.iOS,
colorScheme: colorScheme
.copyWith(background: const Color(0xFFFFFFFF))
.copyWith(error: const Color(0xFFB00020)),
);
}
}
Loading