Skip to content

Commit

Permalink
fix: spell checker
Browse files Browse the repository at this point in the history
  • Loading branch information
Gambley1 committed May 21, 2024
1 parent 6fbabae commit 55744a8
Show file tree
Hide file tree
Showing 88 changed files with 544 additions and 605 deletions.
16 changes: 15 additions & 1 deletion .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,21 @@
"ChildLayouter",
"Paginated",
"blazingly",
"Patreon"
"Patreon",
"dotenv",
"Summ",
"Favourite",
"geolocator",
"Geocoder",
"geocode",
"latlng",
"mipmap",
"xmark",
"Rabotayet",
"placemarks",
"placemark",
"spinkit",
"Yandex"
],
"ignorePaths": [".github/workflows/**"]
}
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
# Papa Burger
# Yandex Food Delivery Clone

Yandex food delivery app clone.
## 💫 About The Project

## Getting Started
[![Github-repository-preview.png](https://i.postimg.cc/JnDCG5Q6/Papa-Burger-food-delivery-app-Preview.png)]

This project is built using Flutter with Dart programming language. It has over
10 screens and a lot of functionals. It uses custom backend server, based on Dart
using Dart Frog package.

![alt text](https://i.postimg.cc/JnDCG5Q6/Papa-Burger-food-delivery-app-Preview.png)
This project is built using Flutter & Dart. It has over
10 screens. It uses custom backend server, based on Dart using Dart Frog package.

This application is used to order food from over than 1000 restaurants, making it
easy to investigate favourite food and quickly get it done.
8 changes: 4 additions & 4 deletions lib/isolates.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ import 'package:papa_burger/src/views/pages/main/state/main_bloc.dart';
Future<void> useRestaurantsIsolate() async {
final mainBloc = MainBloc();
final localStorage = LocalStorage();
final recievePort = ReceivePort();
final receivePort = ReceivePort();
final lat = localStorage.latitude;
final lng = localStorage.longitude;
try {
final isolate = await Isolate.spawn(
_getAllRestaurantsIsolate,
[recievePort.sendPort, lat, lng],
[receivePort.sendPort, lat, lng],
);
final response = await recievePort.first as List<Restaurant>;
final response = await receivePort.first as List<Restaurant>;
mainBloc.allRestaurants.addAll(response);
isolate.kill(priority: Isolate.immediate);
} catch (e) {
recievePort.close();
receivePort.close();
logE(e);
}
}
Expand Down
55 changes: 55 additions & 0 deletions lib/src/config/colors/app_colors.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import 'package:flutter/material.dart';

/// Defines the color palette for the App UI Kit.
abstract class AppColors {
/// Black
static const Color black = Color(0xFF000000);

/// The background color.
static const Color background = Color.fromARGB(255, 32, 30, 30);

/// White
static const Color white = Color(0xFFFFFFFF);

/// Transparent
static const Color transparent = Color(0x00000000);

/// The light blue color.
static const Color lightBlue = Color.fromARGB(255, 100, 181, 246);

/// The blue primary color and swatch.
static const Color blue = Color(0xFF3898EC);

/// The deep blue color.
static const Color deepBlue = Color(0xff337eff);

/// The border outline color.
static const Color borderOutline = Color.fromARGB(45, 250, 250, 250);

/// Light dark.
static const Color lightDark = Color.fromARGB(164, 120, 119, 119);

/// Dark.
static const Color dark = Color.fromARGB(255, 58, 58, 58);

/// Primary dark blue color.
static const Color primaryDarkBlue = Color(0xff1c1e22);

/// Grey.
static const Color grey = Colors.grey;

/// The bright grey color.
static const Color brightGrey = Color.fromARGB(255, 224, 224, 224);

/// The dark grey color.
static const Color darkGrey = Color.fromARGB(255, 66, 66, 66);

/// The emphasize grey color.
static const Color emphasizeGrey = Color.fromARGB(255, 97, 97, 97);

/// The emphasize dark grey color.
static const Color emphasizeDarkGrey = Color.fromARGB(255, 40, 37, 37);

/// Red material color.
static const MaterialColor red = Colors.red;
}
1 change: 0 additions & 1 deletion lib/src/config/config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ export 'extensions/extensions.dart';
export 'logger.dart';
export 'routes/routes.dart';
export 'theme/app_theme.dart';
export 'typedefs.dart';
export 'utils/utils.dart';
65 changes: 8 additions & 57 deletions lib/src/config/extensions/build_context_extension.dart
Original file line number Diff line number Diff line change
@@ -1,59 +1,10 @@
import 'package:flutter/material.dart';
import 'package:papa_burger/src/config/colors/app_colors.dart';
import 'package:papa_burger/src/config/extensions/extensions.dart';

/// Provides values of current device screen `width` and `height` by provided
/// context.
extension BuildContextX on BuildContext {
/// Returns [ThemeData] from [Theme.of].
ThemeData get theme => Theme.of(this);

/// Returns [TextTheme] from [Theme.of]
TextTheme get textTheme => theme.textTheme;

/// Material body large text style.
TextStyle? get bodyLarge => textTheme.bodyLarge;

/// Material body medium text style.
TextStyle? get bodyMedium => textTheme.bodyMedium;

/// Material body small text style.
TextStyle? get bodySmall => textTheme.bodySmall;

/// Material display large text style.
TextStyle? get displayLarge => textTheme.displayLarge;

/// Material display medium text style.
TextStyle? get displayMedium => textTheme.displayMedium;

/// Material display small text style.
TextStyle? get displaySmall => textTheme.displaySmall;

/// Material headline large text style.
TextStyle? get headlineLarge => textTheme.headlineLarge;

/// Material headline medium text style.
TextStyle? get headlineMedium => textTheme.headlineMedium;

/// Material headline small text style.
TextStyle? get headlineSmall => textTheme.headlineSmall;

/// Material label large text style.
TextStyle? get labelLarge => textTheme.labelLarge;

/// Material label medium text style.
TextStyle? get labelMedium => textTheme.labelMedium;

/// Material label small text style.
TextStyle? get labelSmall => textTheme.labelSmall;

/// Material title large text style.
TextStyle? get titleLarge => textTheme.titleLarge;

/// Material title medium text style.
TextStyle? get titleMedium => textTheme.titleMedium;

/// Material title small text style.
TextStyle? get titleSmall => textTheme.titleSmall;

/// Defines current theme [Brightness].
Brightness get brightness => theme.brightness;

Expand All @@ -64,21 +15,21 @@ extension BuildContextX on BuildContext {
bool get isDark => !isLight;

/// Defines an adaptive [Color], depending on current theme brightness.
Color get adaptiveColor => isDark ? Colors.white : Colors.black;
Color get adaptiveColor => isDark ? AppColors.white : AppColors.black;

/// Defines a reversed adaptive [Color], depending on current theme
/// brightness.
Color get reversedAdaptiveColor => isDark ? Colors.black : Colors.white;
Color get reversedAdaptiveColor => isDark ? AppColors.black : AppColors.white;

/// Defines a customisable adaptive [Color]. If [light] or [dark] is not
/// Defines a customizable adaptive [Color]. If [light] or [dark] is not
/// provided default colors are used.
Color customAdaptiveColor({Color? light, Color? dark}) =>
isDark ? (light ?? Colors.white) : (dark ?? Colors.black);
isDark ? (light ?? AppColors.white) : (dark ?? AppColors.black);

/// Defines a customisable reversed adaptive [Color]. If [light] or [dark]
/// Defines a customizable reversed adaptive [Color]. If [light] or [dark]
/// is not provided default reversed colors are used.
Color customReversedAdaptiveColor({Color? light, Color? dark}) =>
isDark ? (dark ?? Colors.black) : (light ?? Colors.white);
isDark ? (dark ?? AppColors.black) : (light ?? AppColors.white);

/// Defines [MediaQueryData] based on provided context.
Size get size => MediaQuery.sizeOf(this);
Expand Down
13 changes: 0 additions & 13 deletions lib/src/config/extensions/disalow_indicator_extension.dart

This file was deleted.

2 changes: 1 addition & 1 deletion lib/src/config/extensions/extensions.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export 'build_context_extension.dart';
export 'connection_state_to_status.dart';
export 'disalow_indicator_extension.dart';
export 'ignore_pointer_extension.dart';
export 'navigator_extension.dart';
export 'show_bottom_modal_sheet_extension.dart';
export 'snack_bar_extension.dart';
export 'text_style_extension.dart';
export 'to_upper_case_extension.dart';
export 'trimmed_converted_string_contains_extension.dart';
13 changes: 2 additions & 11 deletions lib/src/config/extensions/ignore_pointer_extension.dart
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
// ignore_for_file: avoid_bool_literals_in_conditional_expressions

import 'package:flutter/material.dart' show IgnorePointer, Widget;

extension IngnorePointerExtension on Widget {
extension IgnorePointerX on Widget {
Widget ignorePointer({required bool isMoving, bool isMarker = false}) =>
IgnorePointer(
/// If the boolen variable isMarker is true, that means that we use
/// ignore pointer for marker to allow user to move camera through it.
/// Otherwise we just ignoring pointer of any widget of it ancestor
/// when camera is moving in order to prevent random taps on any widgets
ignoring: isMarker ? true : isMoving,
child: this,
);
IgnorePointer(ignoring: isMarker || isMoving, child: this);
}
10 changes: 5 additions & 5 deletions lib/src/config/extensions/navigator_extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ extension NavigatorExtension on BuildContext {
}
}

void pop({bool withHaptickFeedback = false, dynamic result}) {
if (withHaptickFeedback) {
void pop({bool withHapticFeedback = false, dynamic result}) {
if (withHapticFeedback) {
HapticFeedback.heavyImpact();
Navigator.pop(this, result);
} else {
Expand Down Expand Up @@ -80,7 +80,7 @@ extension NavigatorExtension on BuildContext {
arguments: arguments,
);

void navigateToGoolgeMapView([PlaceDetails? placeDetails]) =>
void navigateToGoogleMapView([PlaceDetails? placeDetails]) =>
Navigator.pushAndRemoveUntil(
this,
_defaultRoute(
Expand Down Expand Up @@ -143,14 +143,14 @@ extension NavigatorExtension on BuildContext {

void navigateToOrderDetailsView(
OrderId orderId, {
GlobalKey<ScaffoldMessengerState>? scaffoldMessangerKey,
GlobalKey<ScaffoldMessengerState>? scaffoldMessengerKey,
}) =>
Navigator.pushAndRemoveUntil(
this,
_defaultRoute(
child: OrderDetailsView(
orderId: orderId,
scaffoldMessengerKey: scaffoldMessangerKey,
scaffoldMessengerKey: scaffoldMessengerKey,
),
),
(route) => true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ extension BottomModalSheetExtension on BuildContext {
),
),
],
).disalowIndicator(),
),
bottomNavigationBar: IncreaseDecreaseQuantityBottomAppBar(
item: item,
quantity: ValueNotifier<int>(1),
Expand Down Expand Up @@ -107,7 +107,7 @@ extension BottomModalSheetExtension on BuildContext {
? CustomScrollView(
controller: scrollController,
slivers: children!,
).disalowIndicator()
)
: Column(
mainAxisSize: MainAxisSize.min,
children: children!,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/config/extensions/snack_bar_extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ extension SnackBarExtension on BuildContext {
),
);

void showUndismissibleSnackBar(
void showUndismissableSnackBar(
String text, {
String? solution,
Color color = Colors.white,
Expand Down
57 changes: 57 additions & 0 deletions lib/src/config/extensions/text_style_extension.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import 'package:flutter/material.dart';

/// {@template text_style_extension}
/// TextStyle extension that provides access to [ThemeData] and [TextTheme].
/// {@endtemplate}
extension TextStyleExtension on BuildContext {
/// Returns [ThemeData] from [Theme.of].
ThemeData get theme => Theme.of(this);

/// Returns [TextTheme] from [Theme.of]
TextTheme get textTheme => theme.textTheme;

/// Material body large text style.
TextStyle? get bodyLarge => textTheme.bodyLarge;

/// Material body medium text style.
TextStyle? get bodyMedium => textTheme.bodyMedium;

/// Material body small text style.
TextStyle? get bodySmall => textTheme.bodySmall;

/// Material display large text style.
TextStyle? get displayLarge => textTheme.displayLarge;

/// Material display medium text style.
TextStyle? get displayMedium => textTheme.displayMedium;

/// Material display small text style.
TextStyle? get displaySmall => textTheme.displaySmall;

/// Material headline large text style.
TextStyle? get headlineLarge => textTheme.headlineLarge;

/// Material headline medium text style.
TextStyle? get headlineMedium => textTheme.headlineMedium;

/// Material headline small text style.
TextStyle? get headlineSmall => textTheme.headlineSmall;

/// Material label large text style.
TextStyle? get labelLarge => textTheme.labelLarge;

/// Material label medium text style.
TextStyle? get labelMedium => textTheme.labelMedium;

/// Material label small text style.
TextStyle? get labelSmall => textTheme.labelSmall;

/// Material title large text style.
TextStyle? get titleLarge => textTheme.titleLarge;

/// Material title medium text style.
TextStyle? get titleMedium => textTheme.titleMedium;

/// Material title small text style.
TextStyle? get titleSmall => textTheme.titleSmall;
}
2 changes: 1 addition & 1 deletion lib/src/config/logger.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void logE(

/// Log warning that used for printing warning/important messages
/// to pay developer attention on it, rather than
/// using logI method, because it can be more noticable.
/// using logI method.
void logW(
dynamic message, {
DateTime? time,
Expand Down
3 changes: 0 additions & 3 deletions lib/src/config/typedefs.dart

This file was deleted.

Loading

0 comments on commit 55744a8

Please sign in to comment.