Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 50dd437

Browse files
author
Veli Bacik
committed
login service view viewmodel completed deisgn
1 parent 640a490 commit 50dd437

File tree

23 files changed

+561
-155
lines changed

23 files changed

+561
-155
lines changed

‎asset/image/hotdogs.png‎

15.1 KB
Loading[フレーム]

‎asset/lang/en-US.json‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,15 @@
77
{"title":"Make It Good","desc":"You are not alone. You have unique abiltiyto go to anther world"},
88
"page3":
99
{"title":"Make It Good","desc":"You are not alone. You have unique abiltiyto go to anther world"}
10+
},
11+
12+
"login":{
13+
"tab1":"Login",
14+
"tab2":"SignUp",
15+
"email":"Email",
16+
"password":"Password",
17+
"forgotText":"Forgot Password",
18+
"login":"Login",
19+
"dontAccount":"Dont have account"
1020
}
1121
}

‎lib/core/constants/image/image_constatns.dart‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@ class ImageConstants {
1010

1111
String get logo => toPng("veli");
1212

13-
String toPng(String name) => "assets/image/$name";
13+
String get hotDog => toPng("hotdogs");
14+
15+
String toPng(String name) => "asset/image/$name.png";
1416
}

‎lib/core/extension/string_extension.dart‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ import '../constants/app/app_constants.dart';
55
extension StringLocalization on String {
66
String get locale => this.tr();
77

8-
String get isValidEmail =>
9-
this.contains(RegExp(ApplicationConstants.EMAIL_REGIEX))
10-
? null
11-
: "Email does not valid";
8+
String get isValidEmail => this.contains(RegExp(ApplicationConstants.EMAIL_REGIEX)) ? null : "Email does not valid";
9+
10+
bool get isValidEmails => RegExp(ApplicationConstants.EMAIL_REGIEX).hasMatch(this);
1211
}
1312

1413
extension ImagePathExtension on String {

‎lib/core/init/lang/locale_keys.g.dart‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,13 @@ abstract class LocaleKeys {
1212
static const onBoard_page3_desc = 'onBoard.page3.desc';
1313
static const onBoard_page3 = 'onBoard.page3';
1414
static const onBoard = 'onBoard';
15+
static const login_tab1 = 'login.tab1';
16+
static const login_tab2 = 'login.tab2';
17+
static const login_email = 'login.email';
18+
static const login_password = 'login.password';
19+
static const login_forgotText = 'login.forgotText';
20+
static const login_login = 'login.login';
21+
static const login_dontAccount = 'login.dontAccount';
22+
static const login = 'login';
1523

1624
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import 'package:vexana/vexana.dart';
2+
3+
class VexanaManager {
4+
static VexanaManager _instace;
5+
static VexanaManager get instance {
6+
if (_instace == null) _instace = VexanaManager._init();
7+
return _instace;
8+
}
9+
10+
VexanaManager._init();
11+
12+
INetworkManager networkManager = NetworkManager(isEnableLogger: true, options: BaseOptions(baseUrl: "http://localhost:3000/"));
13+
}

‎lib/core/init/theme/app_theme_light.dart‎

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,26 @@ class AppThemeLight extends AppTheme with ILightTheme {
1818
fontFamily: ApplicationConstants.FONT_FAMILY,
1919
colorScheme: _appColorScheme,
2020
textTheme: textTheme(),
21-
floatingActionButtonTheme:
22-
ThemeData.light().floatingActionButtonTheme.copyWith(),
21+
inputDecorationTheme: InputDecorationTheme(
22+
focusColor: Colors.black12,
23+
labelStyle: TextStyle(),
24+
enabledBorder: UnderlineInputBorder(borderSide: BorderSide(color: Colors.red)),
25+
border: UnderlineInputBorder(borderSide: BorderSide(color: Colors.red)),
26+
focusedBorder: UnderlineInputBorder(borderSide: BorderSide(color: Colors.red))),
27+
scaffoldBackgroundColor: Color(0xfff1f3f8),
28+
floatingActionButtonTheme: ThemeData.light().floatingActionButtonTheme.copyWith(),
2329
tabBarTheme: tabBarTheme(),
2430
);
2531

2632
TabBarTheme tabBarTheme() {
2733
return TabBarTheme(
2834
labelPadding: insets.lowPaddingAll,
29-
unselectedLabelStyle:
30-
textThemeLight.headline4.copyWith(color: colorSchemeLight.red),
35+
unselectedLabelStyle: textThemeLight.headline4.copyWith(color: colorSchemeLight.red),
3136
);
3237
}
3338

3439
TextTheme textTheme() {
35-
return TextTheme(
36-
headline1: textThemeLight.headline1,
37-
headline2: textThemeLight.headline2,
38-
overline: textThemeLight.headline3);
40+
return TextTheme(headline1: textThemeLight.headline1, headline2: textThemeLight.headline2, overline: textThemeLight.headline3);
3941
}
4042

4143
ColorScheme get _appColorScheme {
@@ -51,7 +53,7 @@ class AppThemeLight extends AppTheme with ILightTheme {
5153
onSecondary: Colors.black, //x
5254
onSurface: Colors.white30,
5355
onBackground: Colors.black12,
54-
onError: Colors.orange,
56+
onError: Color(0xffffc93c), //xx
5557
brightness: Brightness.light);
5658
}
5759
}

‎lib/main.dart‎

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import 'package:easy_localization/easy_localization.dart';
22
import 'package:flutter/material.dart';
3-
import 'package:fluttermvvmtemplate/view/authenticate/login/view/login_view.dart';
4-
import 'package:fluttermvvmtemplate/view/authenticate/onboard/view/on_board_view.dart';
53
import 'package:provider/provider.dart';
64

75
import 'core/constants/app/app_constants.dart';
@@ -11,17 +9,14 @@ import 'core/init/navigation/navigation_route.dart';
119
import 'core/init/navigation/navigation_service.dart';
1210
import 'core/init/notifier/provider_list.dart';
1311
import 'core/init/notifier/theme_notifer.dart';
14-
import 'view/authenticate/test/view/test_view.dart';
12+
import 'view/authenticate/login/view/login_view.dart';
1513

1614
void main() {
1715
WidgetsFlutterBinding.ensureInitialized();
1816
LocaleManager.prefrencesInit();
1917
runApp(MultiProvider(
2018
providers: [...ApplicationProvider.instance.dependItems],
21-
child: EasyLocalization(
22-
child: MyApp(),
23-
supportedLocales: LanguageManager.instance.supportedLocales,
24-
path: ApplicationConstants.LANG_ASSET_PATH),
19+
child: EasyLocalization(child: MyApp(), supportedLocales: LanguageManager.instance.supportedLocales, path: ApplicationConstants.LANG_ASSET_PATH),
2520
));
2621
}
2722

@@ -30,7 +25,7 @@ class MyApp extends StatelessWidget {
3025
Widget build(BuildContext context) {
3126
return MaterialApp(
3227
theme: Provider.of<ThemeNotifier>(context, listen: false).currentTheme,
33-
home: OnBoardView(),
28+
home: LoginView(),
3429
onGenerateRoute: NavigationRoute.instance.generateRoute,
3530
navigatorKey: NavigationService.instance.navigatorKey,
3631
);
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
enum NetworkRoutes { LOGIN }
2+
3+
extension NetwrokRoutesString on NetworkRoutes {
4+
String get rawValue {
5+
switch (this) {
6+
case NetworkRoutes.LOGIN:
7+
return "login";
8+
default:
9+
throw Exception("Routes Not FouND");
10+
}
11+
}
12+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import 'package:json_annotation/json_annotation.dart';
2+
import 'package:vexana/vexana.dart';
3+
4+
part 'login_model.g.dart';
5+
6+
@JsonSerializable()
7+
class LoginModel extends INetworkModel<LoginModel> {
8+
final String email;
9+
final String password;
10+
11+
LoginModel({this.email, this.password});
12+
13+
@override
14+
LoginModel fromJson(Map<String, Object> json) {
15+
return _$LoginModelFromJson(json);
16+
}
17+
18+
@override
19+
Map<String, Object> toJson() {
20+
return _$LoginModelToJson(this);
21+
}
22+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /