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