Skip to content

Instantly share code, notes, and snippets.

View fpatelm's full-sized avatar
:octocat:
Focusing

Faizal Patel fpatelm

:octocat:
Focusing
View GitHub Profile
@fpatelm
fpatelm / select_country.dart
Created September 9, 2023 09:31
Country Code Selector Screen
class SelectCountry extends StatefulWidget {
const SelectCountry({Key? key}) : super(key: key);
@override
_SelectCountryState createState() => _SelectCountryState();
}
class _SelectCountryState extends State<SelectCountry> {
List<dynamic>? dataRetrieved; // data decoded from the json file
List<dynamic>? data; // data to display on the screen
@fpatelm
fpatelm / edit_number.dart
Created September 9, 2023 09:30
edit_number_screen
class EditNumber extends StatefulWidget {
const EditNumber({Key? key}) : super(key: key);
@override
_EditNumberState createState() => _EditNumberState();
}
class _EditNumberState extends State<EditNumber> {
var _enterPhoneNumber = TextEditingController();
Map<String, dynamic> data = {"name": "Portugal", "code": "+351"};
@fpatelm
fpatelm / dev.yml
Last active May 10, 2022 15:13
Github actions to deploy to Firebase hosting
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ dev ]
pull_request:
<render mime="application/pdf">
<filterlist>
<fonts>
<font kerning="yes" embed-url="cms://154291159">
<font-triplet name="arial" style="normal" weight="normal"/>
</font>
<font kerning="yes" embed-url="cms://154291159">
<font-triplet name="arial" style="normal" weight="bold"/>
</font>
<font kerning="yes" embed-url="cms://154291159">
<font kerning="yes" embed-url="cms://154291159">
<font-triplet name="arial" style="normal" weight="normal"/>
</font>
<render mime="application/pdf">
private static RestService GetRetrofitService(){
return new Retrofit.Builder()
.baseUrl("https://api.jcdecaux.com")
.client(Utils.GetRequestHeader())
.addConverterFactory(GsonConverterFactory.create())
.build().create(RestService.class);
}
public static void GetStationList(final String contract, final ICallBackStation oCallBack, Context context){
RestService restService = GetRetrofitService();
HashMap<String, String> queryMap = new HashMap<>();
queryMap.put("apiKey", "XXXXXXXXXXXXXXX");
queryMap.put("contract", contract);
Call<List<StationReply>> call = restService.getStationList(queryMap);
call.enqueue(new Callback<List<StationReply>>() {
@Override
public class StationReply {
String number;
String name;
String address;
String latitude;
String longitude;
public String getNumber() {
return number;
public interface RestService {
@GET("/vls/v1/stations")
Call<List<StationReply>> getStationList(@QueryMap Map<String, String> options);
}