mirror of
https://github.com/Myzel394/quid_faciam_hodie.git
synced 2025-06-18 15:25:27 +02:00
improvements & bugfixes
This commit is contained in:
parent
2b5832cf1a
commit
b0878ca740
@ -43,12 +43,14 @@ class _AnnotationDialogState extends State<AnnotationDialog> {
|
||||
style: getBodyTextTextStyle(context),
|
||||
),
|
||||
const SizedBox(height: MEDIUM_SPACE),
|
||||
TextField(
|
||||
PlatformTextField(
|
||||
controller: controller,
|
||||
autofocus: true,
|
||||
decoration: InputDecoration(
|
||||
labelText: localizations
|
||||
.mainScreenAnnotationDialogAnnotationFieldLabel,
|
||||
material: (_, __) => MaterialTextFieldData(
|
||||
decoration: InputDecoration(
|
||||
labelText: localizations
|
||||
.mainScreenAnnotationDialogAnnotationFieldLabel,
|
||||
),
|
||||
),
|
||||
onSubmitted: (value) {
|
||||
Navigator.of(context).pop(value);
|
||||
|
@ -43,10 +43,18 @@ class _MemoryMapScreenState extends State<MemoryMapScreen> with Loadable {
|
||||
longitude: widget.location.longitude,
|
||||
);
|
||||
|
||||
if (!mounted) {
|
||||
return;
|
||||
}
|
||||
|
||||
setState(() {
|
||||
address = foundAddress;
|
||||
});
|
||||
} catch (error) {
|
||||
if (!mounted) {
|
||||
return;
|
||||
}
|
||||
|
||||
setState(() {
|
||||
address = null;
|
||||
});
|
||||
|
@ -27,45 +27,47 @@ class _HelpSheetFormState extends State<HelpSheetForm> {
|
||||
final localizations = AppLocalizations.of(context)!;
|
||||
|
||||
return ModalSheet(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Text(
|
||||
widget.title,
|
||||
textAlign: TextAlign.center,
|
||||
style: getTitleTextStyle(context),
|
||||
),
|
||||
const SizedBox(height: MEDIUM_SPACE),
|
||||
widget.helpContent,
|
||||
const SizedBox(height: LARGE_SPACE),
|
||||
PlatformElevatedButton(
|
||||
child: Text(localizations.generalUnderstoodButtonLabel),
|
||||
onPressed: () => Navigator.pop(context, dontShowSheetAgain),
|
||||
),
|
||||
const SizedBox(height: SMALL_SPACE),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
PlatformSwitch(
|
||||
value: dontShowSheetAgain,
|
||||
activeColor: platformThemeData(
|
||||
context,
|
||||
material: (data) => data.colorScheme.primary,
|
||||
cupertino: (data) => data.primaryColor,
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Text(
|
||||
widget.title,
|
||||
textAlign: TextAlign.center,
|
||||
style: getTitleTextStyle(context),
|
||||
),
|
||||
const SizedBox(height: MEDIUM_SPACE),
|
||||
widget.helpContent,
|
||||
const SizedBox(height: LARGE_SPACE),
|
||||
PlatformElevatedButton(
|
||||
child: Text(localizations.generalUnderstoodButtonLabel),
|
||||
onPressed: () => Navigator.pop(context, dontShowSheetAgain),
|
||||
),
|
||||
const SizedBox(height: SMALL_SPACE),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
PlatformSwitch(
|
||||
value: dontShowSheetAgain,
|
||||
activeColor: platformThemeData(
|
||||
context,
|
||||
material: (data) => data.colorScheme.primary,
|
||||
cupertino: (data) => data.primaryColor,
|
||||
),
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
dontShowSheetAgain = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
dontShowSheetAgain = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
const SizedBox(width: SMALL_SPACE),
|
||||
Text(
|
||||
localizations.helpSheetDontShowAgain,
|
||||
style: getBodyTextTextStyle(context),
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
const SizedBox(width: SMALL_SPACE),
|
||||
Text(
|
||||
localizations.helpSheetDontShowAgain,
|
||||
style: getBodyTextTextStyle(context),
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -1,6 +1,9 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_osm_plugin/flutter_osm_plugin.dart';
|
||||
import 'package:quid_faciam_hodie/constants/spacing.dart';
|
||||
import 'package:quid_faciam_hodie/foreign_types/memory_location.dart';
|
||||
import 'package:quid_faciam_hodie/utils/theme.dart';
|
||||
|
||||
class MemoryMaterialMaps extends StatefulWidget {
|
||||
final MemoryLocation location;
|
||||
@ -70,8 +73,31 @@ class _MemoryMaterialMapsState extends State<MemoryMaterialMaps> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final localizations = AppLocalizations.of(context)!;
|
||||
|
||||
return OSMFlutter(
|
||||
controller: controller,
|
||||
mapIsLoading: Container(
|
||||
color: getSheetColor(context),
|
||||
child: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
const SizedBox(
|
||||
width: LARGE_SPACE,
|
||||
height: LARGE_SPACE,
|
||||
child: CircularProgressIndicator(),
|
||||
),
|
||||
const SizedBox(height: MEDIUM_SPACE),
|
||||
Text(
|
||||
localizations.generalLoadingLabel,
|
||||
style: getBodyTextTextStyle(context),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
initZoom: widget.initialZoom,
|
||||
maxZoomLevel: widget.lockZoom ? widget.initialZoom : 19,
|
||||
minZoomLevel: widget.lockZoom ? widget.initialZoom : 2,
|
||||
|
Loading…
x
Reference in New Issue
Block a user