Skip to content

Commit 316f2b6

Browse files
committed
updated to version 1.0.1+10
1 parent 43c15fa commit 316f2b6

32 files changed

+717
-713
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,16 @@ conduct, and the process for submitting pull requests to us.
3939
- [x] Edit Item
4040
- [x] Delete Item
4141

42+
## Screenshots
43+
44+
<img src='screenshots/1.png' height='500' alt='Screenshot 1' title='Screenshot 1'>
45+
<img src='screenshots/2.png' height='500' alt='Screenshot 2' title='Screenshot 2'>
46+
<img src='screenshots/3.png' height='500' alt='Screenshot 3' title='Screenshot 3'>
47+
<img src='screenshots/4.png' height='500' alt='Screenshot 4' title='Screenshot 4'>
48+
<img src='screenshots/5.png' height='500' alt='Screenshot 5' title='Screenshot 5'>
49+
<img src='screenshots/6.png' height='500' alt='Screenshot 6' title='Screenshot 6'>
50+
<img src='screenshots/7.png' height='500' alt='Screenshot 7' title='Screenshot 7'>
51+
4252
## License
4353

4454
This project is licensed under the GPL-3.0 License - see the

android/app/src/main/AndroidManifest.xml

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,27 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.nixlab.grocery_list_maker">
2+
xmlns:tools="http://schemas.android.com/tools" package="com.nixlab.grocery_list_maker">
33

44
<uses-permission android:name="android.permission.INTERNET" />
55
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
66
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
77

8-
<application
9-
android:name="${applicationName}"
10-
android:icon="@mipmap/launcher_icon"
11-
android:label="Grocery List Maker">
12-
13-
<meta-data
14-
android:name="flutterEmbedding"
15-
android:value="2" />
16-
17-
<activity
18-
android:name=".MainActivity"
19-
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
20-
android:exported="true"
21-
android:hardwareAccelerated="true"
22-
android:launchMode="singleTop"
23-
android:theme="@style/LaunchTheme"
24-
android:windowSoftInputMode="adjustResize">
25-
26-
<meta-data
27-
android:name="io.flutter.embedding.android.NormalTheme"
28-
android:resource="@style/NormalTheme" />
8+
<application android:name="${applicationName}" android:icon="@mipmap/launcher_icon" android:label="Grocery List Maker">
9+
10+
<meta-data android:name="flutterEmbedding" android:value="2" />
11+
12+
<activity android:name=".MainActivity" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:exported="true" android:hardwareAccelerated="true" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:windowSoftInputMode="adjustResize">
13+
14+
<meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="@style/NormalTheme" />
2915
<intent-filter>
3016
<action android:name="android.intent.action.MAIN" />
3117
<category android:name="android.intent.category.LAUNCHER" />
3218
</intent-filter>
3319
</activity>
3420

21+
<provider android:name="androidx.core.content.FileProvider" android:authorities="${applicationId}.fileProvider" android:exported="false" android:grantUriPermissions="true" tools:replace="android:authorities">
22+
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/filepaths" tools:replace="android:resource" />
23+
</provider>
24+
3525
</application>
3626

3727
<queries>

android/build.gradle

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,17 @@ subprojects {
2424
project.evaluationDependsOn(':app')
2525
}
2626

27+
subprojects {
28+
project.configurations.all {
29+
resolutionStrategy.eachDependency { details ->
30+
if (details.requested.group == 'com.android.support'
31+
&& !details.requested.name.contains('multidex') ) {
32+
details.useVersion "27.1.1"
33+
}
34+
}
35+
}
36+
}
37+
2738
task clean(type: Delete) {
2839
delete rootProject.buildDir
2940
}

lib/constants/app_themes.dart

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'package:flutter/material.dart';
2+
import 'package:google_fonts/google_fonts.dart';
23
import 'package:grocery_list_maker/constants/colors.dart';
34

45
class AppThemes {
@@ -15,6 +16,7 @@ class AppThemes {
1516
popupMenuTheme: const PopupMenuThemeData(
1617
color: lightColor,
1718
),
19+
dividerColor: Colors.grey.shade300,
1820
elevatedButtonTheme: ElevatedButtonThemeData(
1921
style: ButtonStyle(
2022
backgroundColor: MaterialStateProperty.all(Colors.redAccent),
@@ -28,20 +30,19 @@ class AppThemes {
2830
appBarTheme: const AppBarTheme(
2931
backgroundColor: lightColor,
3032
),
31-
textTheme: const TextTheme(
32-
bodyText1: TextStyle(color: darkColor),
33-
bodyText2: TextStyle(color: darkColor),
34-
subtitle1: TextStyle(color: darkColor),
35-
subtitle2: TextStyle(color: darkColor),
36-
caption: TextStyle(color: darkColor),
37-
headline1: TextStyle(color: darkColor),
38-
headline2: TextStyle(color: darkColor),
39-
headline3: TextStyle(color: darkColor),
40-
headline4: TextStyle(color: darkColor),
41-
headline5: TextStyle(color: darkColor),
42-
headline6: TextStyle(color: darkColor),
43-
button: TextStyle(color: darkColor),
44-
overline: TextStyle(color: darkColor),
33+
textTheme: TextTheme(
34+
bodyText1: GoogleFonts.poppins(
35+
textStyle: const TextStyle(color: darkColor),
36+
),
37+
bodyText2: GoogleFonts.poppins(
38+
textStyle: const TextStyle(color: darkColor),
39+
),
40+
subtitle1: GoogleFonts.poppins(
41+
textStyle: TextStyle(color: darkColor.withOpacity(0.4)),
42+
),
43+
subtitle2: GoogleFonts.poppins(
44+
textStyle: TextStyle(color: darkColor.withOpacity(0.4)),
45+
),
4546
),
4647
);
4748

@@ -56,6 +57,7 @@ class AppThemes {
5657
popupMenuTheme: const PopupMenuThemeData(
5758
color: darkColor2,
5859
),
60+
dividerColor: Colors.grey.shade700,
5961
elevatedButtonTheme: ElevatedButtonThemeData(
6062
style: ButtonStyle(
6163
backgroundColor: MaterialStateProperty.all(Colors.redAccent),
@@ -69,20 +71,19 @@ class AppThemes {
6971
appBarTheme: const AppBarTheme(
7072
backgroundColor: darkColor,
7173
),
72-
textTheme: const TextTheme(
73-
bodyText1: TextStyle(color: lightColor),
74-
bodyText2: TextStyle(color: lightColor),
75-
subtitle1: TextStyle(color: lightColor),
76-
subtitle2: TextStyle(color: lightColor),
77-
caption: TextStyle(color: lightColor),
78-
headline1: TextStyle(color: lightColor),
79-
headline2: TextStyle(color: lightColor),
80-
headline3: TextStyle(color: lightColor),
81-
headline4: TextStyle(color: lightColor),
82-
headline5: TextStyle(color: lightColor),
83-
headline6: TextStyle(color: lightColor),
84-
button: TextStyle(color: lightColor),
85-
overline: TextStyle(color: lightColor),
74+
textTheme: TextTheme(
75+
bodyText1: GoogleFonts.poppins(
76+
textStyle: const TextStyle(color: lightColor),
77+
),
78+
bodyText2: GoogleFonts.poppins(
79+
textStyle: const TextStyle(color: lightColor),
80+
),
81+
subtitle1: GoogleFonts.poppins(
82+
textStyle: TextStyle(color: lightColor.withOpacity(0.4)),
83+
),
84+
subtitle2: GoogleFonts.poppins(
85+
textStyle: TextStyle(color: lightColor.withOpacity(0.4)),
86+
),
8687
),
8788
);
8889
}

lib/constants/colors.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'dart:ui';
22

33
const Color lightColor = Color.fromRGBO(250, 250, 250, 1);
4-
const Color lightBGColor = Color.fromRGBO(220, 220, 220, 1);
4+
const Color lightBGColor = Color.fromRGBO(230, 230, 230, 1);
55
const Color darkBGColor = Color.fromRGBO(20, 20, 30, 1);
66
const Color darkColor = Color.fromARGB(255, 36, 36, 48);
77
const Color darkColor2 = Color.fromRGBO(21, 21, 36, 1.0);
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
import 'package:flutter/material.dart';
2+
3+
class CustomListTile extends StatelessWidget {
4+
const CustomListTile({
5+
super.key,
6+
this.leading,
7+
this.title,
8+
this.subtitle,
9+
this.trailing,
10+
this.onTap,
11+
this.onLongPress,
12+
this.contentPadding,
13+
this.backgroundColor,
14+
});
15+
16+
final Widget? leading;
17+
final Widget? title;
18+
final Widget? subtitle;
19+
final Widget? trailing;
20+
final VoidCallback? onTap;
21+
final VoidCallback? onLongPress;
22+
final EdgeInsetsGeometry? contentPadding;
23+
final Color? backgroundColor;
24+
25+
@override
26+
Widget build(BuildContext context) {
27+
return GestureDetector(
28+
onTap: onTap,
29+
onLongPress: onLongPress,
30+
behavior: HitTestBehavior.opaque,
31+
child: Container(
32+
width: double.infinity,
33+
padding: contentPadding ?? const EdgeInsets.all(12.0),
34+
decoration: BoxDecoration(
35+
color: backgroundColor ?? Theme.of(context).dialogBackgroundColor,
36+
borderRadius: BorderRadius.circular(8.0),
37+
),
38+
child: Row(
39+
mainAxisAlignment: MainAxisAlignment.start,
40+
crossAxisAlignment: CrossAxisAlignment.center,
41+
children: [
42+
if (leading != null) leading!,
43+
if (leading != null) const SizedBox(width: 16.0),
44+
Expanded(
45+
child: Column(
46+
mainAxisAlignment: MainAxisAlignment.start,
47+
crossAxisAlignment: CrossAxisAlignment.start,
48+
mainAxisSize: MainAxisSize.min,
49+
children: [
50+
if (title != null) title!,
51+
if (subtitle != null) subtitle!,
52+
],
53+
),
54+
),
55+
if (trailing != null) trailing!,
56+
],
57+
),
58+
),
59+
);
60+
}
61+
}

lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class MyApp extends StatelessWidget {
5656
@override
5757
Widget build(BuildContext context) {
5858
return RepositoryProvider.value(
59-
value: _groceryRepository,
59+
value: GroceryRepository(),
6060
child: MultiBlocProvider(
6161
providers: [
6262
BlocProvider(

lib/models/grocery_item.dart

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,22 @@ class GroceryItem extends HiveObject {
5151
@HiveField(6)
5252
final DateTime updatedAt;
5353

54+
String get quantityOrEmpty => quantity ?? '';
55+
String get descriptionOrEmpty => description ?? '';
56+
57+
String getRowDescription(int rowIndex, int itemIndex) {
58+
switch (rowIndex) {
59+
case 0:
60+
return '${itemIndex + 1}.';
61+
case 1:
62+
return '$title\n$descriptionOrEmpty';
63+
case 2:
64+
return quantityOrEmpty;
65+
default:
66+
return '';
67+
}
68+
}
69+
5470
@override
5571
String toString() {
5672
return 'title: $title, createdAt: ${createdAt.toIso8601String()}, updatedAt: ${updatedAt.toIso8601String()}';

0 commit comments

Comments
 (0)