Skip to content

Commit

Permalink
adding assets - fonts and images - and updating theme of the app
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecastrosales committed Sep 16, 2021
1 parent e71b82f commit f742220
Show file tree
Hide file tree
Showing 16 changed files with 129 additions and 10 deletions.
Binary file added assets/fonts/FilmesAppIcons.ttf
Binary file not shown.
Binary file added assets/fonts/metropolis/Metropolis-Bold.otf
Binary file not shown.
Binary file added assets/fonts/metropolis/Metropolis-Regular.otf
Binary file not shown.
Binary file added assets/fonts/metropolis/Metropolis-SemiBold.otf
Binary file not shown.
Binary file added assets/images/2x/header.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/3x/header.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/header.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions lib/application/ui/filmes_app_icons_icons.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/// Flutter icons FilmesAppIcons
/// Copyright (C) 2021 by original authors @ fluttericon.com, fontello.com
/// This font was generated by FlutterIcon.com, which is derived from Fontello.
///
/// To use this font, place it in your fonts/ directory and include the
/// following in your pubspec.yaml
///
/// flutter:
/// fonts:
/// - family: FilmesAppIcons
/// fonts:
/// - asset: fonts/FilmesAppIcons.ttf
///
///
/// * Font Awesome 4, Copyright (C) 2016 by Dave Gandy
/// Author: Dave Gandy
/// License: SIL ()
/// Homepage: http://fortawesome.github.com/Font-Awesome/
///
import 'package:flutter/widgets.dart';

class FilmesAppIcons {
FilmesAppIcons._();

static const _kFontFam = 'FilmesAppIcons';
static const String? _kFontPkg = null;

static const IconData heart =
IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData heartEmpty =
IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg);
}
21 changes: 21 additions & 0 deletions lib/application/ui/filmes_app_ui_config.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import 'package:flutter/material.dart';

class FilmesAppUiConfig {
FilmesAppUiConfig._();

static String get title => 'Filmes App';

static ThemeData get theme => ThemeData(
scaffoldBackgroundColor: Colors.white,
fontFamily: 'Metropolis',
appBarTheme: const AppBarTheme(
backgroundColor:Colors.white,
iconTheme: IconThemeData(color: Colors.black),
titleTextStyle: TextStyle(
color: Color(0xff222222),
fontSize: 18,
fontWeight: FontWeight.w500,
),
),
);
}
7 changes: 7 additions & 0 deletions lib/application/ui/theme_extension.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import 'package:flutter/material.dart';

extension ThemeExtension on BuildContext {
Color get themeRed => const Color(0xffea4335);
Color get themeOrange => const Color(0xffffba49);
Color get themeGrey => const Color(0xff9b9b9b);
}
7 changes: 3 additions & 4 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:firebase_remote_config/firebase_remote_config.dart';
import 'package:get/get.dart';

import 'application/bindings/application_bindings.dart';
import 'application/ui/filmes_app_ui_config.dart';
import 'modules/home/home_module.dart';
import 'modules/login/login_module.dart';
import 'modules/splash/splash_module.dart';
Expand All @@ -24,11 +25,9 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return GetMaterialApp(
title: 'App Filmes',
title: FilmesAppUiConfig.title,
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: Colors.blue,
),
theme: FilmesAppUiConfig.theme,
initialBinding: ApplicationBindings(),
getPages: [
...SplashModule().routers,
Expand Down
15 changes: 15 additions & 0 deletions lib/modules/favorites/favorites_page.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import 'package:flutter/material.dart';

class FavoritesPage extends StatelessWidget {
const FavoritesPage({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Favorites'),
),
body: Container(),
);
}
}
23 changes: 20 additions & 3 deletions lib/modules/home/home_page.dart
Original file line number Diff line number Diff line change
@@ -1,15 +1,32 @@
import 'package:flutter/material.dart';

import 'package:app_filmes/application/ui/filmes_app_icons_icons.dart';
import 'package:app_filmes/application/ui/theme_extension.dart';

class HomePage extends StatelessWidget {
const HomePage({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('HomePage'),
bottomNavigationBar: BottomNavigationBar(
selectedItemColor: context.themeRed,
unselectedItemColor: context.themeGrey,
items: const [
BottomNavigationBarItem(
icon: Icon(Icons.movie),
label: 'Filmes',
),
BottomNavigationBarItem(
icon: Icon(FilmesAppIcons.heartEmpty),
label: 'Favoritos',
),
BottomNavigationBarItem(
icon: Icon(Icons.logout_outlined),
label: 'Sair',
),
],
),
body: Container(),
);
}
}
8 changes: 5 additions & 3 deletions lib/modules/login/login_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ class LoginController extends GetxController with LoaderMixin, MessagesMixin {
print(e);
print(s);
loading(false);
MessageModel.error(
title: 'Error',
message: 'Login with Error',
message(
MessageModel.error(
title: 'Error',
message: 'Login with Error',
),
);
}
}
Expand Down
16 changes: 16 additions & 0 deletions lib/modules/movies/movies_page.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import 'package:flutter/material.dart';

class MoviesPageDart extends StatelessWidget {

const MoviesPageDart({ Key? key }) : super(key: key);

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Movies'),
),
body: Container(),
);
}
}
10 changes: 10 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,13 @@ flutter:
uses-material-design: true
assets:
- assets/images/
fonts:
- family: FilmesAppIcons
fonts:
- asset: assets/fonts/FilmesAppIcons.ttf
- family: Metropolis
fonts:
- asset: assets/fonts/Metropolis-Regular.otf/
- asset: assets/fonts/Metropolis-Semibold.otf/
weight: 600
- asset: assets/fonts/Metropolis-Bold.otf/

0 comments on commit f742220

Please sign in to comment.