mirror of
https://github.com/Myzel394/quid_faciam_hodie.git
synced 2025-06-18 23:35:25 +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),
|
style: getBodyTextTextStyle(context),
|
||||||
),
|
),
|
||||||
const SizedBox(height: MEDIUM_SPACE),
|
const SizedBox(height: MEDIUM_SPACE),
|
||||||
TextField(
|
PlatformTextField(
|
||||||
controller: controller,
|
controller: controller,
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
decoration: InputDecoration(
|
material: (_, __) => MaterialTextFieldData(
|
||||||
labelText: localizations
|
decoration: InputDecoration(
|
||||||
.mainScreenAnnotationDialogAnnotationFieldLabel,
|
labelText: localizations
|
||||||
|
.mainScreenAnnotationDialogAnnotationFieldLabel,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
onSubmitted: (value) {
|
onSubmitted: (value) {
|
||||||
Navigator.of(context).pop(value);
|
Navigator.of(context).pop(value);
|
||||||
|
@ -43,10 +43,18 @@ class _MemoryMapScreenState extends State<MemoryMapScreen> with Loadable {
|
|||||||
longitude: widget.location.longitude,
|
longitude: widget.location.longitude,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!mounted) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
address = foundAddress;
|
address = foundAddress;
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if (!mounted) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
address = null;
|
address = null;
|
||||||
});
|
});
|
||||||
|
@ -27,45 +27,47 @@ class _HelpSheetFormState extends State<HelpSheetForm> {
|
|||||||
final localizations = AppLocalizations.of(context)!;
|
final localizations = AppLocalizations.of(context)!;
|
||||||
|
|
||||||
return ModalSheet(
|
return ModalSheet(
|
||||||
child: Column(
|
child: SingleChildScrollView(
|
||||||
children: <Widget>[
|
child: Column(
|
||||||
Text(
|
children: <Widget>[
|
||||||
widget.title,
|
Text(
|
||||||
textAlign: TextAlign.center,
|
widget.title,
|
||||||
style: getTitleTextStyle(context),
|
textAlign: TextAlign.center,
|
||||||
),
|
style: getTitleTextStyle(context),
|
||||||
const SizedBox(height: MEDIUM_SPACE),
|
),
|
||||||
widget.helpContent,
|
const SizedBox(height: MEDIUM_SPACE),
|
||||||
const SizedBox(height: LARGE_SPACE),
|
widget.helpContent,
|
||||||
PlatformElevatedButton(
|
const SizedBox(height: LARGE_SPACE),
|
||||||
child: Text(localizations.generalUnderstoodButtonLabel),
|
PlatformElevatedButton(
|
||||||
onPressed: () => Navigator.pop(context, dontShowSheetAgain),
|
child: Text(localizations.generalUnderstoodButtonLabel),
|
||||||
),
|
onPressed: () => Navigator.pop(context, dontShowSheetAgain),
|
||||||
const SizedBox(height: SMALL_SPACE),
|
),
|
||||||
Row(
|
const SizedBox(height: SMALL_SPACE),
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
Row(
|
||||||
children: <Widget>[
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
PlatformSwitch(
|
children: <Widget>[
|
||||||
value: dontShowSheetAgain,
|
PlatformSwitch(
|
||||||
activeColor: platformThemeData(
|
value: dontShowSheetAgain,
|
||||||
context,
|
activeColor: platformThemeData(
|
||||||
material: (data) => data.colorScheme.primary,
|
context,
|
||||||
cupertino: (data) => data.primaryColor,
|
material: (data) => data.colorScheme.primary,
|
||||||
|
cupertino: (data) => data.primaryColor,
|
||||||
|
),
|
||||||
|
onChanged: (value) {
|
||||||
|
setState(() {
|
||||||
|
dontShowSheetAgain = value;
|
||||||
|
});
|
||||||
|
},
|
||||||
),
|
),
|
||||||
onChanged: (value) {
|
const SizedBox(width: SMALL_SPACE),
|
||||||
setState(() {
|
Text(
|
||||||
dontShowSheetAgain = value;
|
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/material.dart';
|
||||||
|
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||||
import 'package:flutter_osm_plugin/flutter_osm_plugin.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/foreign_types/memory_location.dart';
|
||||||
|
import 'package:quid_faciam_hodie/utils/theme.dart';
|
||||||
|
|
||||||
class MemoryMaterialMaps extends StatefulWidget {
|
class MemoryMaterialMaps extends StatefulWidget {
|
||||||
final MemoryLocation location;
|
final MemoryLocation location;
|
||||||
@ -70,8 +73,31 @@ class _MemoryMaterialMapsState extends State<MemoryMaterialMaps> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final localizations = AppLocalizations.of(context)!;
|
||||||
|
|
||||||
return OSMFlutter(
|
return OSMFlutter(
|
||||||
controller: controller,
|
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,
|
initZoom: widget.initialZoom,
|
||||||
maxZoomLevel: widget.lockZoom ? widget.initialZoom : 19,
|
maxZoomLevel: widget.lockZoom ? widget.initialZoom : 19,
|
||||||
minZoomLevel: widget.lockZoom ? widget.initialZoom : 2,
|
minZoomLevel: widget.lockZoom ? widget.initialZoom : 2,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user