Skip to content

Commit

Permalink
feat: add padding around GPS component
Browse files Browse the repository at this point in the history
  • Loading branch information
Aline Bonnet authored and OtterWays committed Sep 11, 2024
1 parent 5b6b12f commit adf461c
Showing 1 changed file with 22 additions and 20 deletions.
42 changes: 22 additions & 20 deletions lib/page/capture_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -291,26 +291,28 @@ class _CapturePageState extends State<CapturePage> with WidgetsBindingObserver {
Widget accurancyComponent() {
return _accuracy == null
? Container()
: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(8)),
),
padding: EdgeInsets.all(8.0),
child: Row(mainAxisSize: MainAxisSize.min, children: [
Icon(
_accuracy! > 10 ? Icons.error : Icons.gps_fixed,
size: 24,
color: _accuracy! > 10 ? Colors.red : Colors.blue,
),
SizedBox(width: 8),
DefaultTextStyle(
style: TextStyle(
color: _accuracy! > 10 ? Colors.red : Colors.blue),
child: Text(
"${_accuracy?.toStringAsFixed(2)} ${AppLocalizations.of(context)!.meters}"),
)
]));
: Padding(
padding: EdgeInsets.all(32),
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(8)),
),
padding: EdgeInsets.all(8.0),
child: Row(mainAxisSize: MainAxisSize.min, children: [
Icon(
_accuracy! > 10 ? Icons.error : Icons.gps_fixed,
size: 24,
color: _accuracy! > 10 ? Colors.red : Colors.blue,
),
SizedBox(width: 8),
DefaultTextStyle(
style: TextStyle(
color: _accuracy! > 10 ? Colors.red : Colors.blue),
child: Text(
"${_accuracy?.toStringAsFixed(2)} ${AppLocalizations.of(context)!.meters}"),
)
])));
}

Widget createBurstButtons() {
Expand Down

0 comments on commit adf461c

Please sign in to comment.