Skip to content

Most bugs are resolved. #26

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

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
19 changes: 16 additions & 3 deletions lib/core/components/button/normal_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,24 @@ class NormalButton extends StatelessWidget {
const NormalButton({Key key, this.child, this.onPressed}) : super(key: key);
@override
Widget build(BuildContext context) {
return RaisedButton(
padding: EdgeInsets.all(15),
elevation: 10,
return ElevatedButton(
style: ButtonStyle(
padding: MaterialStateProperty.all(EdgeInsets.all(15)),
elevation: MaterialStateProperty.all(10),
),
onPressed: onPressed,
child: child,
);
}
}


/*BEFORE: Flutter 2.0

RaisedButton(
padding: EdgeInsets.all(15),
elevation: 10,
onPressed: onPressed,
child: child,
);
*/
2 changes: 1 addition & 1 deletion lib/core/constants/navigation/navigation_constants.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class NavigationConstants {
static const TEST_VIEW = "/test";
static const TEST_VIEW = '/test';
}
2 changes: 1 addition & 1 deletion lib/core/init/lang/language_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
class LanguageManager {
static LanguageManager _instance;
static LanguageManager get instance {
if (_instance == null) _instance = LanguageManager._init();
_instance ??= LanguageManager._init();
return _instance;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/core/init/navigation/navigation_route.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import '../../components/card/not_found_navigation_widget.dart';
import '../../constants/navigation/navigation_constants.dart';

class NavigationRoute {
static NavigationRoute _instance = NavigationRoute._init();
static final NavigationRoute _instance = NavigationRoute._init();
static NavigationRoute get instance => _instance;

NavigationRoute._init();
Expand Down
2 changes: 1 addition & 1 deletion lib/core/init/network/network_core/core_operations.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of "../core_dio.dart";
part of '../core_dio.dart';

extension _CoreDioOperations on CoreDio {
R _responseParser<R, T>(BaseModel model, dynamic data) {
Expand Down
9 changes: 6 additions & 3 deletions lib/core/init/network/network_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@ import 'core_dio.dart';
class NetworkManager {
static NetworkManager _instance;
static NetworkManager get instance {
if (_instance == null) _instance = NetworkManager._init();
_instance ??= NetworkManager._init();
return _instance;
}

ICoreDio coreDio;

NetworkManager._init() {
final baseOptions =
BaseOptions(baseUrl: "https://jsonplaceholder.typicode.com/", headers: {"val": LocaleManager.instance.getStringValue(PreferencesKeys.TOKEN)});
final baseOptions = BaseOptions(
baseUrl: 'https://jsonplaceholder.typicode.com/',
headers: {
'val': LocaleManager.instance.getStringValue(PreferencesKeys.TOKEN)
});
// _dio = Dio(baseOptions);

coreDio = CoreDio(baseOptions);
Expand Down
2 changes: 1 addition & 1 deletion lib/core/init/notifier/provider_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'theme_notifer.dart';
class ApplicationProvider {
static ApplicationProvider _instance;
static ApplicationProvider get instance {
if (_instance == null) _instance = ApplicationProvider._init();
_instance ??= ApplicationProvider._init();
return _instance;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/core/init/theme/light/color_scheme_light.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
class ColorSchemeLight {
static ColorSchemeLight _instace;
static ColorSchemeLight get instance {
if (_instace == null) _instace = ColorSchemeLight._init();
_instace ??= ColorSchemeLight._init();
return _instace;
}

Expand Down
20 changes: 13 additions & 7 deletions lib/core/init/theme/light/text_theme_light.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,22 @@ import 'package:flutter/material.dart';
class TextThemeLight {
static TextThemeLight _instace;
static TextThemeLight get instance {
if (_instace == null) _instace = TextThemeLight._init();
_instace ??= TextThemeLight._init();
return _instace;
}

TextThemeLight._init();

final TextStyle headline1 = TextStyle(fontSize: 96, fontWeight: FontWeight.w300, letterSpacing: -1.5);
final TextStyle headline2 = TextStyle(fontSize: 60, fontWeight: FontWeight.w300, letterSpacing: -0.5);
final TextStyle headline3 = TextStyle(fontSize: 48, fontWeight: FontWeight.w400);
final TextStyle headline4 = TextStyle(fontSize: 34, fontWeight: FontWeight.w400, letterSpacing: 0.25);
final TextStyle headline5 = TextStyle(fontSize: 24, fontWeight: FontWeight.w400);
final TextStyle overline = TextStyle(fontSize: 10, fontWeight: FontWeight.w400, letterSpacing: 1.5);
final TextStyle headline1 =
TextStyle(fontSize: 96, fontWeight: FontWeight.w300, letterSpacing: -1.5);
final TextStyle headline2 =
TextStyle(fontSize: 60, fontWeight: FontWeight.w300, letterSpacing: -0.5);
final TextStyle headline3 =
TextStyle(fontSize: 48, fontWeight: FontWeight.w400);
final TextStyle headline4 =
TextStyle(fontSize: 34, fontWeight: FontWeight.w400, letterSpacing: 0.25);
final TextStyle headline5 =
TextStyle(fontSize: 24, fontWeight: FontWeight.w400);
final TextStyle overline =
TextStyle(fontSize: 10, fontWeight: FontWeight.w400, letterSpacing: 1.5);
}
9 changes: 6 additions & 3 deletions lib/core/init/theme/panache/red_theme.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';

const String FONT_FAMILY = "Poppins";
const String FONT_FAMILY = 'Poppins';

final ThemeData redTheme = ThemeData(
fontFamily: FONT_FAMILY,
Expand Down Expand Up @@ -31,8 +31,11 @@ final ThemeData redTheme = ThemeData(
textSelectionHandleColor: Color(0xffe57373),
backgroundColor: Color(0xffef9a9a),
toggleButtonsTheme: ToggleButtonsThemeData(
fillColor: Color(0xffC20003), textStyle: TextStyle(color: Colors.white), selectedColor: Colors.white),
floatingActionButtonTheme: FloatingActionButtonThemeData(backgroundColor: Color(0xffC20003)),
fillColor: Color(0xffC20003),
textStyle: TextStyle(color: Colors.white),
selectedColor: Colors.white),
floatingActionButtonTheme:
FloatingActionButtonThemeData(backgroundColor: Color(0xffC20003)),

dialogBackgroundColor: Color(0xffffffff),

Expand Down
35 changes: 29 additions & 6 deletions lib/product/widget/button/header_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ class HeaderButton extends StatelessWidget {
final String titleText;
final VoidCallback onPressed;

const HeaderButton({Key key, this.titleText, this.onPressed}) : super(key: key);
const HeaderButton({Key key, this.titleText, this.onPressed})
: super(key: key);
@override
Widget build(BuildContext context) {
return Padding(
Expand All @@ -23,12 +24,35 @@ class HeaderButton extends StatelessWidget {
Text buildTextTitle(BuildContext context) {
return Text(
titleText.tr(),
style: context.textTheme.headline6.copyWith(color: context.colorScheme.onError),
style: context.textTheme.headline6
.copyWith(color: context.colorScheme.onError),
);
}

FlatButton buildFlatButtonRight(BuildContext context) {
return FlatButton(
TextButton buildFlatButtonRight(BuildContext context) {
return TextButton(
onPressed: () {
onPressed();
},
child: Wrap(
crossAxisAlignment: WrapCrossAlignment.center,
children: [
Text(LocaleKeys.home_game_viewAll.tr(),
style: context.textTheme.subtitle2
.copyWith(color: context.colorScheme.onError)),
Icon(Icons.arrow_right, color: context.colorScheme.onError)
],
),
style: ButtonStyle(padding: MaterialStateProperty.all(EdgeInsets.zero)),
);
}
}


/*

BEFORE: Flutter 2.0
FlatButton(
padding: EdgeInsets.zero,
onPressed: () {
onPressed();
Expand All @@ -40,5 +64,4 @@ class HeaderButton extends StatelessWidget {
Icon(Icons.arrow_right, color: context.colorScheme.onError)
],
));
}
}
*/
2 changes: 1 addition & 1 deletion lib/view/_product/_widgets/button/login_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class MVVMLoginButton extends StatelessWidget {
return IconNormalButton(
icon: Icons.access_alarm,
onPressed: () {
onComplete("OKEY");
onComplete('OKEY');
// BUSINESS CALL
},
);
Expand Down
24 changes: 20 additions & 4 deletions lib/view/_product/_widgets/list-tile/friend_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,29 @@ class FriendCard extends StatelessWidget {
title: Text(user.name),
onTap: onPressed,
subtitle: Text(user.company),
trailing: RaisedButton(
trailing: ElevatedButton(
onPressed: () {},
child: Text(LocaleKeys.home_social_follow).tr(),
style: ButtonStyle(
padding: MaterialStateProperty.all(EdgeInsets.zero),
textStyle: MaterialStateProperty.all(
TextStyle(color: context.colorScheme.background)),
backgroundColor: MaterialStateProperty.all<Color>(
context.appTheme.buttonTheme.colorScheme.onError),
),
),
);
}
}


/* BEFORE: Flutter 2.0
RaisedButton (
child: Text(LocaleKeys.home_social_follow).tr(),
onPressed: () {},
padding: EdgeInsets.zero,
textColor: context.colorScheme.background,
color: context.appTheme.buttonTheme.colorScheme.onError,
),
);
}
}

*/
Loading