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'; | |
import 'package:address_search_field/address_search_field.dart'; | |
class Example extends StatelessWidget { | |
final _geoMethods = GeoMethods( | |
googleApiKey: 'GOOGLE_API_KEY', | |
language: 'es-419', | |
countryCode: 'ec', | |
country: 'Ecuador', | |
city: 'Esmeraldas', |
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'; | |
import 'package:address_search_field/address_search_field.dart'; | |
class Example extends StatelessWidget { | |
final _geoMethods = GeoMethods( | |
googleApiKey: 'GOOGLE_API_KEY', | |
language: 'es-419', | |
countryCode: 'ec', | |
country: 'Ecuador', | |
city: 'Esmeraldas', |
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'; | |
import 'package:address_search_field/address_search_field.dart'; | |
class Example extends StatelessWidget { | |
final _geoMethods = GeoMethods( | |
googleApiKey: 'GOOGLE_API_KEY', | |
language: 'es-419', | |
countryCode: 'ec', | |
country: 'Ecuador', | |
city: 'Esmeraldas', |
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
name: Flutter CI | |
# This workflow is triggered on pushes to the repository. | |
# file dir: %flutter-project%/.github/workflows/main.yml | |
on: | |
push: | |
branches: | |
- master | |
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
/// https://stackoverflow.com/questions/64529394/flutter-dart-how-to-remove-excepted-element-in-list-in-map | |
class PlatformFilter { | |
bool isSelected; | |
int id; | |
PlatformFilter(this.id, this.isSelected); | |
} | |
class Game { | |
int id; |
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
class People { | |
static final People _inst = People._internal(); | |
People._internal(); | |
factory People(int id, String name) { | |
assert(!_inst._lock, "it's a singleton that can't re-defined"); | |
_inst.id = id; | |
_inst.name = name; | |
_inst._lock = true; | |
return _inst; |
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 'model.dart'; | |
void main() { | |
List<LatLng> decodeEncodedPolyline({@required String encoded}) { | |
List<LatLng> polyline = []; | |
int index = 0, len = encoded.length; | |
int lat = 0, lng = 0; | |
int decode(int positon) { | |
int shift = 0, result = 0; | |
do { |
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 'dart:async'; | |
import 'package:flutter/foundation.dart'; | |
void main() { | |
FutureOr<void> tryCatchLoop({ | |
@required FutureOr<void> Function() code, | |
@required FutureOr<void> Function(dynamic error) onError, | |
Duration duration = const Duration(milliseconds: 200), int limitTimes = 5 | |
}) async { | |
int count = 0; |
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 'dart:async'; | |
import 'package:flutter/material.dart'; | |
import 'package:google_maps_flutter/google_maps_flutter.dart'; | |
import 'package:address_search_field/address_search_field.dart'; | |
void main() { | |
runApp(MaterialApp( | |
title: 'Flutter Demo', | |
theme: ThemeData( | |
primarySwatch: Colors.blue, |