This file contains hidden or 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
| import 'package:flutter/material.dart'; | |
| void main() => runApp(new MyApp()); | |
| class MyApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp(title: 'Flutter Animated Popup', theme: ThemeData(), home: _myApp()); | |
| } | |
| } |
This file contains hidden or 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
| showMyData(){ | |
| Column( | |
| children: <Widget>[ | |
| Text(“Logged in as: ${myFacebookData[‘name’]}”), | |
| Container( | |
| height: 200.0, | |
| width: 200.0, | |
| decoration: BoxDecoration( | |
| shape: BoxShape.circle, |
This file contains hidden or 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
| Future facebookLogin() async { | |
| final FacebookLoginResult result = | |
| await facebookSignIn.logInWithReadPermissions(['email']); | |
| switch (result.status) { | |
| case FacebookLoginStatus.loggedIn: | |
| final FacebookAccessToken accessToken = result.accessToken; | |
| break; | |
| case FacebookLoginStatus.cancelledByUser: | |
| break; | |
| case FacebookLoginStatus.error: |
This file contains hidden or 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
| Center( | |
| child: Column( | |
| mainAxisAlignment: MainAxisAlignment.center, | |
| children: <Widget>[ | |
| Image.asset( | |
| 'assets/main_page.jpg', | |
| height: MediaQuery.of(context).size.height * 0.4, | |
| width: MediaQuery.of(context).size.width * 0.4, | |
| ), | |
| Row( |
This file contains hidden or 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
| import 'package:google_maps_flutter/google_maps_flutter.dart'; | |
| import 'package:http/http.dart' as http; | |
| import 'dart:convert'; | |
| const apiKey = "AIzaSyBhDflq5iJrXIcKpeq0IzLQPQpOboX91lY"; | |
| class GoogleMapsServices{ | |
| Future<String> getRouteCoordinates(LatLng l1, LatLng l2)async{ | |
| String url = "https://maps.googleapis.com/maps/api/directions/json?origin=${l1.latitude},${l1.longitude}&destination=${l2.latitude},${l2.longitude}&key=$apiKey"; | |
| http.Response response = await http.get(url); | |
| Map values = jsonDecode(response.body); |
NewerOlder