-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
55 changed files
with
6,851 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
<manifest xmlns:android="http:https://schemas.android.com/apk/res/android" | ||
package="com.example.shop"> | ||
<uses-permission android:name="android.permission.ACCESS_FILE_LOCATION"/> | ||
<uses-permission android:name="android.permission.INTERNET"/> | ||
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" /> | ||
<uses-permission android:name="android.permission.VIBRATE"/> | ||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
<manifest xmlns:android="http:https://schemas.android.com/apk/res/android" | ||
package="com.example.shop"> | ||
<uses-permission android:name="android.permission.ACCESS_FILE_LOCATION"/> | ||
<uses-permission android:name="android.permission.INTERNET"/> | ||
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" /> | ||
<uses-permission android:name="android.permission.VIBRATE"/> | ||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// coverage:ignore-file | ||
// GENERATED CODE - DO NOT MODIFY BY HAND | ||
// ignore_for_file: type=lint | ||
|
||
part of 'environment.dart'; | ||
|
||
// ************************************************************************** | ||
// MatcherGenerator | ||
// ************************************************************************** | ||
|
||
extension $EnvironmentMatcherExtension on Environment { | ||
T when<T>({ | ||
required T Function() production, | ||
required T Function() staging, | ||
required T Function() development, | ||
}) { | ||
switch (this) { | ||
case Environment.production: | ||
return production(); | ||
case Environment.staging: | ||
return staging(); | ||
case Environment.development: | ||
return development(); | ||
} | ||
} | ||
|
||
T whenConst<T>({ | ||
required T production, | ||
required T staging, | ||
required T development, | ||
}) { | ||
switch (this) { | ||
case Environment.production: | ||
return production; | ||
case Environment.staging: | ||
return staging; | ||
case Environment.development: | ||
return development; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
// ************************************************************************** | ||
// AutoRouteGenerator | ||
// ************************************************************************** | ||
|
||
// GENERATED CODE - DO NOT MODIFY BY HAND | ||
|
||
// ************************************************************************** | ||
// AutoRouteGenerator | ||
// ************************************************************************** | ||
// | ||
// ignore_for_file: type=lint | ||
|
||
part of 'app_router.dart'; | ||
|
||
class _$AppRouter extends RootStackRouter { | ||
_$AppRouter([GlobalKey<NavigatorState>? navigatorKey]) : super(navigatorKey); | ||
|
||
@override | ||
final Map<String, PageFactory> pagesMap = { | ||
ShopsRoute.name: (routeData) { | ||
return CustomPage<void>( | ||
routeData: routeData, | ||
child: const ShopsPage(), | ||
transitionsBuilder: TransitionsBuilders.slideLeft, | ||
opaque: true, | ||
barrierDismissible: false, | ||
); | ||
}, | ||
ShopProductsRoute.name: (routeData) { | ||
final args = routeData.argsAs<ShopProductsRouteArgs>(); | ||
return CustomPage<void>( | ||
routeData: routeData, | ||
child: ShopProductsPage( | ||
key: args.key, | ||
shop: args.shop, | ||
), | ||
transitionsBuilder: TransitionsBuilders.slideLeft, | ||
opaque: true, | ||
barrierDismissible: false, | ||
); | ||
}, | ||
}; | ||
|
||
@override | ||
List<RouteConfig> get routes => [ | ||
RouteConfig( | ||
'/#redirect', | ||
path: '/', | ||
redirectTo: '/shops', | ||
fullMatch: true, | ||
), | ||
RouteConfig( | ||
ShopsRoute.name, | ||
path: '/shops', | ||
), | ||
RouteConfig( | ||
ShopProductsRoute.name, | ||
path: '/shop_products', | ||
), | ||
]; | ||
} | ||
|
||
/// generated route for | ||
/// [ShopsPage] | ||
class ShopsRoute extends PageRouteInfo<void> { | ||
const ShopsRoute() | ||
: super( | ||
ShopsRoute.name, | ||
path: '/shops', | ||
); | ||
|
||
static const String name = 'ShopsRoute'; | ||
} | ||
|
||
/// generated route for | ||
/// [ShopProductsPage] | ||
class ShopProductsRoute extends PageRouteInfo<ShopProductsRouteArgs> { | ||
ShopProductsRoute({ | ||
Key? key, | ||
required Shop shop, | ||
}) : super( | ||
ShopProductsRoute.name, | ||
path: '/shop_products', | ||
args: ShopProductsRouteArgs( | ||
key: key, | ||
shop: shop, | ||
), | ||
); | ||
|
||
static const String name = 'ShopProductsRoute'; | ||
} | ||
|
||
class ShopProductsRouteArgs { | ||
const ShopProductsRouteArgs({ | ||
this.key, | ||
required this.shop, | ||
}); | ||
|
||
final Key? key; | ||
|
||
final Shop shop; | ||
|
||
@override | ||
String toString() { | ||
return 'ShopProductsRouteArgs{key: $key, shop: $shop}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:shop/src/core/resource/theme/sizes.dart'; | ||
|
||
Future<void> showDraggableBottomSheet({ | ||
required Widget child, | ||
required BuildContext context, | ||
}) => | ||
showModalBottomSheet( | ||
context: context, | ||
useRootNavigator: true, | ||
backgroundColor: Colors.transparent, | ||
barrierColor: Colors.black.withOpacity(0.48), | ||
builder: (context) => ConstrainedBox( | ||
constraints: const BoxConstraints( | ||
minHeight: 120, | ||
), | ||
child: Container( | ||
decoration: const BoxDecoration( | ||
color: Color.fromARGB(255, 245, 245, 245), | ||
borderRadius: BorderRadius.only( | ||
topLeft: Radius.circular(10), | ||
topRight: Radius.circular(10), | ||
), | ||
), | ||
padding: const EdgeInsets.only( | ||
left: kDefaultPadding, | ||
right: kDefaultPadding, | ||
bottom: 30, | ||
), | ||
child: Column( | ||
mainAxisSize: MainAxisSize.min, | ||
children: [ | ||
const SizedBox(height: 8), | ||
Container( | ||
height: 4, | ||
width: 44, | ||
decoration: const BoxDecoration( | ||
color: Color(0xFFDEDEDE), | ||
borderRadius: BorderRadius.all(Radius.circular(4)), | ||
), | ||
), | ||
const SizedBox(height: 24), | ||
child | ||
], | ||
), | ||
), | ||
), | ||
); |
Oops, something went wrong.