Facebook
From natural, 1 Month ago, written in Dart.
This paste is a reply to Untitled from natural - view diff
Embed
Download Paste or View Raw
Hits: 155
  1. import 'package:flutter/material.dart';
  2.  
  3. class LocationDialog extends StatelessWidget {
  4.   final successMsg;
  5.   final onPressed;
  6.  
  7.   LocationDialog({@required this.successMsg, required this.onPressed});
  8.  
  9.   @override
  10.   Widget build(BuildContext context) {
  11.     return AlertDialog(
  12.       content: Text("To continue turn on device location, which uses Google's location service"),
  13.       actions: [
  14.         ElevatedButton(
  15.           onPressed: () {
  16.             Navigator.pop(context); // Close the dialog
  17.           },
  18.           child: Text('No Thanks'),
  19.         ),
  20.         ElevatedButton(
  21.           onPressed: onPressed,
  22.           child: Text('Ok'),
  23.         ),
  24.       ],
  25.     );
  26.   }
  27. }
  28.