Skip to content

Commit 2e555fd

Browse files
authored
Merge pull request #14 from devq8/temp
Merge conflects
2 parents 55d025f + e9fa924 commit 2e555fd

6 files changed

Lines changed: 59 additions & 9 deletions

File tree

wasfat_frontend/android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ if (flutterVersionName == null) {
2121
flutterVersionName = '1.0'
2222
}
2323

24-
apply plugin: 'com.android.application'
24+
apply plugin: 'com.example.firebase'
2525
apply plugin: 'kotlin-android'
2626
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2727

wasfat_frontend/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 50;
6+
objectVersion = 51;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -76,7 +76,6 @@
7676
22670F5EC4097EEAEA61697F /* Pods-Runner.release.xcconfig */,
7777
CD49A2AF674E9D63F67E8AAB /* Pods-Runner.profile.xcconfig */,
7878
);
79-
name = Pods;
8079
path = Pods;
8180
sourceTree = "<group>";
8281
};
@@ -356,13 +355,14 @@
356355
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
357356
CLANG_ENABLE_MODULES = YES;
358357
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
358+
DEVELOPMENT_TEAM = NVGF9RCE9P;
359359
ENABLE_BITCODE = NO;
360360
INFOPLIST_FILE = Runner/Info.plist;
361361
LD_RUNPATH_SEARCH_PATHS = (
362362
"$(inherited)",
363363
"@executable_path/Frameworks",
364364
);
365-
PRODUCT_BUNDLE_IDENTIFIER = com.example.wasfatFrontend;
365+
PRODUCT_BUNDLE_IDENTIFIER = khaled.alghanim.wasfatFrontend;
366366
PRODUCT_NAME = "$(TARGET_NAME)";
367367
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
368368
SWIFT_VERSION = 5.0;
@@ -484,13 +484,14 @@
484484
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
485485
CLANG_ENABLE_MODULES = YES;
486486
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
487+
DEVELOPMENT_TEAM = NVGF9RCE9P;
487488
ENABLE_BITCODE = NO;
488489
INFOPLIST_FILE = Runner/Info.plist;
489490
LD_RUNPATH_SEARCH_PATHS = (
490491
"$(inherited)",
491492
"@executable_path/Frameworks",
492493
);
493-
PRODUCT_BUNDLE_IDENTIFIER = com.example.wasfatFrontend;
494+
PRODUCT_BUNDLE_IDENTIFIER = khaled.alghanim.wasfatFrontend;
494495
PRODUCT_NAME = "$(TARGET_NAME)";
495496
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
496497
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -506,13 +507,14 @@
506507
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
507508
CLANG_ENABLE_MODULES = YES;
508509
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
510+
DEVELOPMENT_TEAM = NVGF9RCE9P;
509511
ENABLE_BITCODE = NO;
510512
INFOPLIST_FILE = Runner/Info.plist;
511513
LD_RUNPATH_SEARCH_PATHS = (
512514
"$(inherited)",
513515
"@executable_path/Frameworks",
514516
);
515-
PRODUCT_BUNDLE_IDENTIFIER = com.example.wasfatFrontend;
517+
PRODUCT_BUNDLE_IDENTIFIER = khaled.alghanim.wasfatFrontend;
516518
PRODUCT_NAME = "$(TARGET_NAME)";
517519
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
518520
SWIFT_VERSION = 5.0;

wasfat_frontend/ios/Runner/Info.plist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>CADisableMinimumFrameDurationOnPhone</key>
6+
<true/>
57
<key>CFBundleDevelopmentRegion</key>
68
<string>$(DEVELOPMENT_LANGUAGE)</string>
79
<key>CFBundleDisplayName</key>
@@ -24,6 +26,8 @@
2426
<string>$(FLUTTER_BUILD_NUMBER)</string>
2527
<key>LSRequiresIPhoneOS</key>
2628
<true/>
29+
<key>UIApplicationSupportsIndirectInputEvents</key>
30+
<true/>
2731
<key>UILaunchStoryboardName</key>
2832
<string>LaunchScreen</string>
2933
<key>UIMainStoryboardFile</key>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import 'package:image_picker/image_picker.dart';
2+
3+
class Profile {
4+
int id;
5+
String username;
6+
XFile? image;
7+
8+
Profile({
9+
required this.id,
10+
required this.username,
11+
this.image,
12+
});
13+
14+
factory Profile.fromJson(Map<String, dynamic> json) {
15+
return Profile(
16+
id: json['id'],
17+
username: json['username'],
18+
image: json['image'] ??
19+
'https://st4.depositphotos.com/4329009/19956/v/600/depositphotos_199564354-stock-illustration-creative-vector-illustration-default-avatar.jpg',
20+
);
21+
}
22+
}

wasfat_frontend/lib/pages/ingredient/ingredients.dart

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,27 @@ import 'package:wasfat_frontend/providers/ingredient_provider.dart';
77
import 'package:wasfat_frontend/widgets/category_card.dart';
88
import 'package:wasfat_frontend/widgets/ingredient_card.dart';
99

10-
class Ingredients extends StatelessWidget {
10+
class Ingredients extends StatefulWidget {
1111
final Category category;
1212
Ingredients({required this.category});
1313

14+
@override
15+
State<Ingredients> createState() => _IngredientsState();
16+
}
17+
18+
class _IngredientsState extends State<Ingredients> {
19+
@override
20+
void initState() {
21+
context
22+
.read<IngredientProvider>()
23+
.loadIngredients(category_id: widget.category.id);
24+
}
25+
1426
@override
1527
Widget build(BuildContext context) {
1628
return Scaffold(
1729
appBar: AppBar(
18-
title: Text('Ingredients of ${category.title}'),
30+
title: Text('Ingredients of ${widget.category.title}'),
1931
backgroundColor: Color(0xFFf14b24),
2032
),
2133
floatingActionButton: FloatingActionButton(
@@ -31,7 +43,7 @@ class Ingredients extends StatelessWidget {
3143
onRefresh: () async {
3244
context
3345
.read<IngredientProvider>()
34-
.loadIngredients(category_id: category.id);
46+
.loadIngredients(category_id: widget.category.id);
3547
},
3648
child: Padding(
3749
padding: EdgeInsets.all(7),

wasfat_frontend/lib/pages/recipe/list.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,16 @@ class _RecipesListState extends State<RecipesList> {
115115
),
116116
)),
117117
),
118+
// Container(
119+
// height: 50,
120+
// child: SliverList(
121+
// delegate: SliverChildBuilderDelegate((context, index) {
122+
// return Container(
123+
// height: 20,
124+
// );
125+
// }),
126+
// ),
127+
// ),
118128
Expanded(
119129
child: Padding(
120130
padding: const EdgeInsets.all(7.0),

0 commit comments

Comments
 (0)