fix: optimalizovat a upravit barvy
This commit is contained in:
parent
365976a853
commit
e9173a6acd
10 changed files with 43 additions and 64 deletions
|
@ -1,6 +1,7 @@
|
|||
# 1.6.0
|
||||
- rozdělit iOS a Android UI zvlášť pro možnost využití Cupertino knihovny
|
||||
- opravit chybu s FlutterLocalNotifications na iOS
|
||||
- upravit vzhled
|
||||
# 1.5.1
|
||||
- aktualizovat knihovnu canteenlib
|
||||
- přidat podporu pro splitování APK podle ABI
|
||||
|
|
|
@ -339,13 +339,7 @@ class _AndroidJidelnicekState extends State<AndroidJidelnicek> {
|
|||
),
|
||||
);
|
||||
} else if (value == Languages.of(context)!.review) {
|
||||
(Platform.isAndroid)
|
||||
? launchUrl(
|
||||
Uri.parse("market://details?id=cz.hernikplays.opencanteen"),
|
||||
mode: LaunchMode.externalApplication)
|
||||
: launchUrl(
|
||||
Uri.parse(
|
||||
"https://apps.apple.com/cz/app/opencanteen/id1621124445"),
|
||||
launchUrl(Uri.parse("market://details?id=cz.hernikplays.opencanteen"),
|
||||
mode: LaunchMode.externalApplication);
|
||||
} else if (value == Languages.of(context)!.reportBugs) {
|
||||
launchUrl(Uri.parse("https://forms.gle/jKN7QeFJwpaApSbC8"),
|
||||
|
|
|
@ -272,12 +272,10 @@ class _AndroidLoginState extends State<AndroidLogin> {
|
|||
/// Získá offline soubor a zobrazí údaje
|
||||
void goOffline() async {
|
||||
if (!mounted) return;
|
||||
if (Platform.isAndroid) {
|
||||
Navigator.pushAndRemoveUntil(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: ((context) => const AndroidOfflineJidelnicek())),
|
||||
(route) => false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,6 +80,7 @@ class _AndroidNastaveniState extends State<AndroidNastaveni> {
|
|||
Text(Languages.of(context)!.saveOffline),
|
||||
Switch(
|
||||
value: _ukladatOffline,
|
||||
activeColor: Colors.purple,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_ukladatOffline = value;
|
||||
|
@ -115,6 +116,7 @@ class _AndroidNastaveniState extends State<AndroidNastaveni> {
|
|||
children: [
|
||||
Text(Languages.of(context)!.skipWeekend),
|
||||
Switch(
|
||||
activeColor: Colors.purple,
|
||||
value: _preskakovatVikend,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
|
@ -129,6 +131,7 @@ class _AndroidNastaveniState extends State<AndroidNastaveni> {
|
|||
children: [
|
||||
Flexible(child: Text(Languages.of(context)!.checkOrdered)),
|
||||
Switch(
|
||||
activeColor: Colors.purple,
|
||||
value: _kontrolovatTyden,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
|
@ -143,6 +146,7 @@ class _AndroidNastaveniState extends State<AndroidNastaveni> {
|
|||
children: [
|
||||
Flexible(child: Text(Languages.of(context)!.notifyLunch)),
|
||||
Switch(
|
||||
activeColor: Colors.purple,
|
||||
value: _oznameniObed,
|
||||
thumbColor: (!_zapamatovany
|
||||
? MaterialStateProperty.all(Colors.grey)
|
||||
|
|
|
@ -117,13 +117,7 @@ class _AndroidOfflineJidelnicekState extends State<AndroidOfflineJidelnicek> {
|
|||
Navigator.pushReplacement(
|
||||
context, MaterialPageRoute(builder: (c) => const AndroidLogin()));
|
||||
} else if (value == Languages.of(context)!.review) {
|
||||
(Platform.isAndroid)
|
||||
? launchUrl(
|
||||
Uri.parse("market://details?id=cz.hernikplays.opencanteen"),
|
||||
mode: LaunchMode.externalApplication)
|
||||
: launchUrl(
|
||||
Uri.parse(
|
||||
"https://apps.apple.com/cz/app/opencanteen/id1621124445"),
|
||||
launchUrl(Uri.parse("market://details?id=cz.hernikplays.opencanteen"),
|
||||
mode: LaunchMode.externalApplication);
|
||||
} else if (value == Languages.of(context)!.reportBugs) {
|
||||
launchUrl(Uri.parse("https://forms.gle/jKN7QeFJwpaApSbC8"),
|
||||
|
|
|
@ -33,7 +33,6 @@ class _IOSLoginState extends State<IOSLogin> {
|
|||
void initState() {
|
||||
super.initState();
|
||||
LoginManager.getDetails().then((r) async {
|
||||
if (Platform.isIOS) {
|
||||
// žádat o oprávnění na iOS
|
||||
await flutterLocalNotificationsPlugin
|
||||
.resolvePlatformSpecificImplementation<
|
||||
|
@ -43,13 +42,7 @@ class _IOSLoginState extends State<IOSLogin> {
|
|||
badge: true,
|
||||
sound: true,
|
||||
);
|
||||
} else if (Platform.isAndroid) {
|
||||
// žádat o oprávnění na android
|
||||
flutterLocalNotificationsPlugin
|
||||
.resolvePlatformSpecificImplementation<
|
||||
AndroidFlutterLocalNotificationsPlugin>()
|
||||
?.requestPermission();
|
||||
}
|
||||
|
||||
if (r != null) {
|
||||
// Automaticky přihlásit
|
||||
showDialog(
|
||||
|
@ -146,16 +139,14 @@ class _IOSLoginState extends State<IOSLogin> {
|
|||
Languages.of(context)!.logIn,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
TextField(
|
||||
CupertinoTextField(
|
||||
controller: userControl,
|
||||
autofillHints: const [AutofillHints.username],
|
||||
decoration: InputDecoration(
|
||||
labelText: Languages.of(context)!.username),
|
||||
prefix: Text(Languages.of(context)!.username),
|
||||
),
|
||||
TextField(
|
||||
CupertinoTextField(
|
||||
autofillHints: const [AutofillHints.password],
|
||||
decoration: InputDecoration(
|
||||
labelText: Languages.of(context)!.password),
|
||||
prefix: Text(Languages.of(context)!.password),
|
||||
controller: passControl,
|
||||
obscureText: true,
|
||||
),
|
||||
|
@ -283,12 +274,9 @@ class _IOSLoginState extends State<IOSLogin> {
|
|||
/// Získá offline soubor a zobrazí údaje
|
||||
void goOffline() async {
|
||||
if (!mounted) return;
|
||||
if (Platform.isAndroid) {
|
||||
Navigator.pushAndRemoveUntil(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: ((context) => const IOSOfflineJidelnicek())),
|
||||
MaterialPageRoute(builder: ((context) => const IOSOfflineJidelnicek())),
|
||||
(route) => false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,6 +80,7 @@ class _IOSNastaveniState extends State<IOSNastaveni> {
|
|||
children: [
|
||||
Text(Languages.of(context)!.saveOffline),
|
||||
CupertinoSwitch(
|
||||
activeColor: Colors.purple,
|
||||
value: _ukladatOffline,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
|
@ -116,6 +117,7 @@ class _IOSNastaveniState extends State<IOSNastaveni> {
|
|||
children: [
|
||||
Text(Languages.of(context)!.skipWeekend),
|
||||
CupertinoSwitch(
|
||||
activeColor: Colors.purple,
|
||||
value: _preskakovatVikend,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
|
@ -130,6 +132,7 @@ class _IOSNastaveniState extends State<IOSNastaveni> {
|
|||
children: [
|
||||
Flexible(child: Text(Languages.of(context)!.checkOrdered)),
|
||||
CupertinoSwitch(
|
||||
activeColor: Colors.purple,
|
||||
value: _kontrolovatTyden,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
|
@ -144,8 +147,8 @@ class _IOSNastaveniState extends State<IOSNastaveni> {
|
|||
children: [
|
||||
Flexible(child: Text(Languages.of(context)!.notifyLunch)),
|
||||
CupertinoSwitch(
|
||||
activeColor: Colors.purple,
|
||||
value: _oznameniObed,
|
||||
thumbColor: (Colors.grey),
|
||||
onChanged: (value) {
|
||||
if (!_zapamatovany) {
|
||||
showDialog(
|
||||
|
|
|
@ -117,13 +117,8 @@ class _IOSOfflineJidelnicekState extends State<IOSOfflineJidelnicek> {
|
|||
Navigator.pushReplacement(
|
||||
context, MaterialPageRoute(builder: (c) => const IOSLogin()));
|
||||
} else if (value == Languages.of(context)!.review) {
|
||||
(Platform.isAndroid)
|
||||
? launchUrl(
|
||||
Uri.parse("market://details?id=cz.hernikplays.opencanteen"),
|
||||
mode: LaunchMode.externalApplication)
|
||||
: launchUrl(
|
||||
Uri.parse(
|
||||
"https://apps.apple.com/cz/app/opencanteen/id1621124445"),
|
||||
launchUrl(
|
||||
Uri.parse("https://apps.apple.com/cz/app/opencanteen/id1621124445"),
|
||||
mode: LaunchMode.externalApplication);
|
||||
} else if (value == Languages.of(context)!.reportBugs) {
|
||||
launchUrl(Uri.parse("https://forms.gle/jKN7QeFJwpaApSbC8"),
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
- Optimalizace ze strany kodu
|
||||
- Úpravy vzhledu
|
|
@ -1 +1,2 @@
|
|||
- Code optimization
|
||||
- Theme edits
|
Reference in a new issue