Skip to content

Commit

Permalink
AppUser modeli yozildi
Browse files Browse the repository at this point in the history
  • Loading branch information
BahromjonPolat committed Dec 23, 2021
1 parent 611edd8 commit d8a1c86
Show file tree
Hide file tree
Showing 13 changed files with 350 additions and 79 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ android {

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "uz.itjunior.ui.app.flutter_ui"
applicationId "uz.itjunior.ui.app.flutterui"
minSdkVersion 21
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
Expand Down
6 changes: 6 additions & 0 deletions lib/components/exporting_packages.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,16 @@ export 'package:material_dialogs/material_dialogs.dart';
export 'package:url_launcher/url_launcher.dart';
export 'package:provider/provider.dart';

// Screens
export 'package:flutter_ui/screens/discuss/discuss_page.dart';

// Widgets

export 'package:flutter_ui/widgets/my_text_widget.dart';

// Components
export 'package:flutter_ui/components/colors.dart';
export 'package:flutter_ui/components/size_config.dart';
export 'package:flutter_ui/components/asset_icons.dart';

export 'package:flutter/services.dart';
32 changes: 32 additions & 0 deletions lib/data/page_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ String _gitHubLink =

List<PageUI> pageList = [
new PageUI(
'jhJHJH8hadq',
"Book Store",
"Book store UI",
"",
Expand All @@ -15,6 +16,7 @@ List<PageUI> pageList = [
BookStoreMainPage(),
),
new PageUI(
'jhJHJHasadq',
"Sport",
"Sport list",
"",
Expand All @@ -24,6 +26,7 @@ List<PageUI> pageList = [
SportMenPage(),
),
new PageUI(
'rpA8hadq',
"Courses",
"UI",
"",
Expand All @@ -33,6 +36,7 @@ List<PageUI> pageList = [
CoursesMainPage(),
),
new PageUI(
'as09JBqmdq',
"Foods",
"25-08-2021",
"",
Expand All @@ -42,6 +46,7 @@ List<PageUI> pageList = [
FoodListMainPage(),
),
new PageUI(
'opwmUy7Fva',
"Coffee Bar",
"26-08-2021",
"Foydalanilgan Vidjetlar SliverAppBar, SliverList, SliverGrid",
Expand All @@ -51,6 +56,7 @@ List<PageUI> pageList = [
CoffeeBarMainPage(),
),
new PageUI(
'ade8haq',
"Hotel UI",
"Mexmonxona UI",
"Mexmonxona",
Expand All @@ -60,6 +66,7 @@ List<PageUI> pageList = [
HotelMainPage(),
),
new PageUI(
'adkfaq',
"Super Mario",
"08-09-2021",
"_description",
Expand All @@ -69,6 +76,8 @@ List<PageUI> pageList = [
SuperMarioMainPage(),
),
new PageUI(

'jhJHdfH8hadq',
"Auth",
"Login page",
"---",
Expand All @@ -78,6 +87,7 @@ List<PageUI> pageList = [
AuthSplashScreenPage(),
),
new PageUI(
'sdfOwaA',
"Order Food",
"_subtitle",
"_description",
Expand All @@ -87,6 +97,7 @@ List<PageUI> pageList = [
OrderFoodSplashScreenPage(),
),
new PageUI(
'AR-J4mf',
"Water Shop",
"Sub",
"Desc",
Expand All @@ -96,6 +107,7 @@ List<PageUI> pageList = [
WaterShopRegisterPage(),
),
new PageUI(
'dhYw-i',
"Marks",
"_subtitle",
"_description",
Expand All @@ -105,6 +117,7 @@ List<PageUI> pageList = [
MarkListPage(),
),
new PageUI(
'iwn-nd0',
"Friendship",
"Chat App",
"Imtihonda berilgan vazifa",
Expand All @@ -114,6 +127,7 @@ List<PageUI> pageList = [
FriendshipSplashScreenPage(),
),
new PageUI(
'car_bazarao',
"Car Bazar",
"Cars",
"_description",
Expand All @@ -123,6 +137,7 @@ List<PageUI> pageList = [
CarBazarMainPage(),
),
new PageUI(
'uab-89bd',
"Plus Messenger",
"Telegram UI",
"_description",
Expand All @@ -132,6 +147,7 @@ List<PageUI> pageList = [
PlusMessengerMainPage(),
),
new PageUI(
'barb-ioa',
"Barber Shop",
" Awesome barber shop",
"",
Expand All @@ -141,6 +157,7 @@ List<PageUI> pageList = [
BarberShopSplashScreen(),
),
new PageUI(
'booking-ui-id',
"Booking Hotel",
"Hotel",
"",
Expand All @@ -150,6 +167,7 @@ List<PageUI> pageList = [
BookingHotelSplashScreen(),
),
new PageUI(
'messaging-idsaa',
"Messaging App",
"Chat App",
"",
Expand All @@ -159,6 +177,7 @@ List<PageUI> pageList = [
MessagingAppMainPage(),
),
new PageUI(
'ajaiji4omIni',
"Counter App",
"",
"",
Expand All @@ -168,6 +187,7 @@ List<PageUI> pageList = [
CounterAppMainPage(),
),
new PageUI(
'kamJKh9ha-a',
"Fashion App",
"Fashion",
"",
Expand All @@ -177,6 +197,7 @@ List<PageUI> pageList = [
FashionPageMain(),
),
new PageUI(
'ak-O9jnNd',
"Select Coffee",
"_subtitle",
"_description",
Expand All @@ -186,6 +207,7 @@ List<PageUI> pageList = [
SelectCoffeeMainPage(),
),
new PageUI(
'adla-aknraKKHm',
"Furniture App",
"_subtitle",
"_description",
Expand All @@ -195,6 +217,7 @@ List<PageUI> pageList = [
FurnitureShopMainPage(),
),
new PageUI(
'-ankanden',
"Yacht",
"_subtitle",
"_description",
Expand All @@ -204,6 +227,7 @@ List<PageUI> pageList = [
YachtMainPage(),
),
new PageUI(
'adakOpr',
"Coffee Delivery",
"Coffee",
"_",
Expand All @@ -213,6 +237,7 @@ List<PageUI> pageList = [
OnBoardingPage(),
),
new PageUI(
'adkao-dam',
"Tic Tac Toe",
"",
"_description",
Expand All @@ -222,6 +247,7 @@ List<PageUI> pageList = [
TicTacToe(),
),
new PageUI(
'alKr09ff',
"Rate Exchange",
"",
"",
Expand All @@ -231,6 +257,7 @@ List<PageUI> pageList = [
CurrencyPage(),
),
new PageUI(
'zlklKrna-or',
"Tapping Game",
"",
"",
Expand All @@ -240,6 +267,7 @@ List<PageUI> pageList = [
TappingGame(),
),
new PageUI(
'airna-uMndne',
"Azan time",
"",
"",
Expand All @@ -249,6 +277,7 @@ List<PageUI> pageList = [
PrayerTimeWelcomeSceen(),
),
new PageUI(
'zfv-9fjTd',
"Pics",
"",
"",
Expand All @@ -258,6 +287,7 @@ List<PageUI> pageList = [
PicListMain(),
),
new PageUI(
'ak-0OndalmMh',
"Free Dictionary",
"",
"",
Expand All @@ -267,6 +297,7 @@ List<PageUI> pageList = [
FreeDictionary(),
),
new PageUI(
'akf-nkU',
"Audio Player",
"",
"",
Expand All @@ -276,6 +307,7 @@ List<PageUI> pageList = [
AudioPlayerMainPage(),
),
new PageUI(
'kljalkfKHjf9a',
"Cars",
"",
"",
Expand Down
65 changes: 65 additions & 0 deletions lib/model/app_user_model.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
class AppUser {
late String _id;
late String _name;
late String _email;
late String _password;
late String _imageUrl;
late String _role;
late String _status;
late DateTime _firstReg;
late DateTime _lastAction;

AppUser(
this._id,
this._name,
this._email,
this._password,
this._imageUrl,
this._role,
this._status,
this._firstReg,
this._lastAction,
);

AppUser.fromJson(Map<String, dynamic> map) {
_id = map['id'];
_name = map['name'];
_password = map['password'];
_email = map['email'];
_imageUrl = map['imageUrl'];
_firstReg = map['firstReg'].toDate();
_lastAction = map['lastAction'].toDate();
_status = map['status'];
_role = map['role'];
}

Map<String, dynamic> toMap() => {
'id': _id,
'name': _name,
'email': _email,
'password': _password,
'firstReg': _firstReg,
'lastAction': _lastAction,
'status': _status,
'imageUrl': _imageUrl,
'role': _role,
};

DateTime get lastAction => _lastAction;

DateTime get firstReg => _firstReg;

String get status => _status;

String get role => _role;

String get imageUrl => _imageUrl;

String get password => _password;

String get email => _email;

String get name => _name;

String get id => _id;
}
4 changes: 4 additions & 0 deletions lib/model/page.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';

class PageUI {
String _id;
String _title;
String _subtitle;
String _description;
Expand All @@ -10,6 +11,7 @@ class PageUI {
Widget _page;

PageUI(
this._id,
this._title,
this._subtitle,
this._description,
Expand All @@ -32,4 +34,6 @@ class PageUI {
String get date => _date;

String get sourceCode => _sourceCode;

String get id => _id;
}
Loading

0 comments on commit d8a1c86

Please sign in to comment.