|
|
@ -93,7 +93,7 @@ class _PlaceMapState extends State<PlaceMap> {
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
_watchMapConfigurationChanges();
|
|
|
|
_watchMapConfigurationChanges();
|
|
|
|
var state = Provider.of<AppState>(context);
|
|
|
|
var state = Provider.of<AppState>(context, listen: true);
|
|
|
|
return Builder(builder: (context) {
|
|
|
|
return Builder(builder: (context) {
|
|
|
|
// We need this additional builder here so that we can pass its context to
|
|
|
|
// We need this additional builder here so that we can pass its context to
|
|
|
|
// _AddPlaceButtonBar's onSavePressed callback. This callback shows a
|
|
|
|
// _AddPlaceButtonBar's onSavePressed callback. This callback shows a
|
|
|
@ -489,9 +489,9 @@ class _CategoryButtonBar extends StatelessWidget {
|
|
|
|
child: ButtonBar(
|
|
|
|
child: ButtonBar(
|
|
|
|
alignment: MainAxisAlignment.center,
|
|
|
|
alignment: MainAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
ElevatedButton(
|
|
|
|
FilledButton(
|
|
|
|
style: ElevatedButton.styleFrom(
|
|
|
|
style: FilledButton.styleFrom(
|
|
|
|
foregroundColor:
|
|
|
|
backgroundColor:
|
|
|
|
selectedPlaceCategory == PlaceCategory.favorite
|
|
|
|
selectedPlaceCategory == PlaceCategory.favorite
|
|
|
|
? Colors.green[700]
|
|
|
|
? Colors.green[700]
|
|
|
|
: Colors.lightGreen),
|
|
|
|
: Colors.lightGreen),
|
|
|
@ -501,9 +501,9 @@ class _CategoryButtonBar extends StatelessWidget {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onPressed: () => onChanged(PlaceCategory.favorite),
|
|
|
|
onPressed: () => onChanged(PlaceCategory.favorite),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
ElevatedButton(
|
|
|
|
FilledButton(
|
|
|
|
style: ElevatedButton.styleFrom(
|
|
|
|
style: FilledButton.styleFrom(
|
|
|
|
foregroundColor:
|
|
|
|
backgroundColor:
|
|
|
|
selectedPlaceCategory == PlaceCategory.visited
|
|
|
|
selectedPlaceCategory == PlaceCategory.visited
|
|
|
|
? Colors.green[700]
|
|
|
|
? Colors.green[700]
|
|
|
|
: Colors.lightGreen),
|
|
|
|
: Colors.lightGreen),
|
|
|
@ -513,9 +513,9 @@ class _CategoryButtonBar extends StatelessWidget {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onPressed: () => onChanged(PlaceCategory.visited),
|
|
|
|
onPressed: () => onChanged(PlaceCategory.visited),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
ElevatedButton(
|
|
|
|
FilledButton(
|
|
|
|
style: ElevatedButton.styleFrom(
|
|
|
|
style: FilledButton.styleFrom(
|
|
|
|
foregroundColor:
|
|
|
|
backgroundColor:
|
|
|
|
selectedPlaceCategory == PlaceCategory.wantToGo
|
|
|
|
selectedPlaceCategory == PlaceCategory.wantToGo
|
|
|
|
? Colors.green[700]
|
|
|
|
? Colors.green[700]
|
|
|
|
: Colors.lightGreen),
|
|
|
|
: Colors.lightGreen),
|
|
|
@ -556,7 +556,6 @@ class _MapFabs extends StatelessWidget {
|
|
|
|
heroTag: 'add_place_button',
|
|
|
|
heroTag: 'add_place_button',
|
|
|
|
onPressed: onAddPlacePressed,
|
|
|
|
onPressed: onAddPlacePressed,
|
|
|
|
materialTapTargetSize: MaterialTapTargetSize.padded,
|
|
|
|
materialTapTargetSize: MaterialTapTargetSize.padded,
|
|
|
|
backgroundColor: Colors.green,
|
|
|
|
|
|
|
|
child: const Icon(Icons.add_location, size: 36.0),
|
|
|
|
child: const Icon(Icons.add_location, size: 36.0),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
const SizedBox(height: 12.0),
|
|
|
|
const SizedBox(height: 12.0),
|
|
|
@ -565,7 +564,6 @@ class _MapFabs extends StatelessWidget {
|
|
|
|
onPressed: onToggleMapTypePressed,
|
|
|
|
onPressed: onToggleMapTypePressed,
|
|
|
|
materialTapTargetSize: MaterialTapTargetSize.padded,
|
|
|
|
materialTapTargetSize: MaterialTapTargetSize.padded,
|
|
|
|
mini: true,
|
|
|
|
mini: true,
|
|
|
|
backgroundColor: Colors.green,
|
|
|
|
|
|
|
|
child: const Icon(Icons.layers, size: 28.0),
|
|
|
|
child: const Icon(Icons.layers, size: 28.0),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|