-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from OpenPecha/develop
Develop
- Loading branch information
Showing
8 changed files
with
117 additions
and
19 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class CountryMarker extends StatefulWidget { | ||
final Map<String, dynamic> country; | ||
const CountryMarker({super.key, required this.country}); | ||
|
||
@override | ||
State<CountryMarker> createState() => _CountryMarkerState(); | ||
} | ||
|
||
class _CountryMarkerState extends State<CountryMarker> { | ||
final GlobalKey key = GlobalKey(); | ||
@override | ||
Widget build(BuildContext context) { | ||
return InkWell( | ||
onTap: () { | ||
final dynamic tooltip = key.currentState; | ||
tooltip.ensureTooltipVisible(); | ||
}, | ||
child: Tooltip( | ||
key: key, | ||
message: widget.country['name'] as String, | ||
textStyle: TextStyle( | ||
color: Theme.of(context).colorScheme.onSurface, | ||
), | ||
decoration: BoxDecoration( | ||
color: Theme.of(context).colorScheme.surfaceContainer, | ||
borderRadius: BorderRadius.circular(8)), | ||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 4), | ||
child: Image.asset('assets/images/country.png')), | ||
); | ||
} | ||
} |