-
Notifications
You must be signed in to change notification settings - Fork 0
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
i.khuzhakhmetov
committed
Oct 26, 2023
1 parent
b673f30
commit 5c2038b
Showing
46 changed files
with
742 additions
and
550 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 was deleted.
Oops, something went wrong.
This file was deleted.
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
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,6 @@ | ||
import 'package:intl/intl.dart'; | ||
|
||
extension DateExtension on DateTime { | ||
String formattedDate({String format = 'dd MMMM yyyy'}) => | ||
DateFormat(format).format(this); | ||
} |
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,13 @@ | ||
abstract class TextValidations { | ||
static String? isNotEmpty(String? value) { | ||
return value?.isNotEmpty == true ? null : 'Can not be empty'; | ||
} | ||
|
||
static String? isCorrectPrice(String? value) { | ||
final parsed = double.tryParse(value?.replaceAll(',', '.') ?? ''); | ||
|
||
return value?.isNotEmpty == true && parsed != null && parsed > 0 | ||
? null | ||
: 'Incorrect price'; | ||
} | ||
} |
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
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
File renamed without changes.
File renamed without changes.
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,19 +1,22 @@ | ||
import 'package:e_shop_flutter/presentation/screens/application/application.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
import 'core/di/di.dart'; | ||
import 'presentation/application/application.dart'; | ||
|
||
void main() { | ||
//Initialize DI | ||
setUp(); | ||
|
||
runApp(FutureBuilder( | ||
runApp( | ||
FutureBuilder( | ||
future: locator.allReady(), | ||
builder: (context, snapshot) { | ||
if (snapshot.hasData) { | ||
return Application(); | ||
} else { | ||
return const CircularProgressIndicator(); | ||
} | ||
})); | ||
}, | ||
), | ||
); | ||
} |
Oops, something went wrong.