Skip to content

Instantly share code, notes, and snippets.

View freedive-cebu30's full-sized avatar

Joji freedive-cebu30

View GitHub Profile
man_3 = {'age': 30, 'name': 'Fow', 'height': 160}
man_1 = {'age': 10, 'name': 'Aikawa', 'height': 180}
man_2 = {'age': 20, 'name': 'Erika', 'height': 170}
man_4 = {'age': 25, 'name': 'Zam', 'height': 150}
man_list = []
man_list.append(man_3)
man_list.append(man_1)
man_list.append(man_2)
man_list.append(man_4)
@freedive-cebu30
freedive-cebu30 / main.dart
Last active May 26, 2020 16:48
permission_handler_1
import 'package:location/location.dart';
import 'package:permission_handler/permission_handler.dart' as per_handler;
void main() {
runApp(
ExchangeShop(),
);
}
class MapCebu extends StatefulWidget {
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
import 'dart:async';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:firebase_admob/firebase_admob.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:location/location.dart';
import 'package:phexchangestore/models/store.dart';
import 'package:phexchangestore/models/store_data.dart';
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.joji.phexchangestore">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<application
android:name="io.flutter.app.FlutterApplication"
android:label="Exchange Shop"
android:icon="@mipmap/ic_launcher">
name: phexchangestore
description: A new Flutter application.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
@freedive-cebu30
freedive-cebu30 / i18n_delegate.dart
Created May 21, 2020 16:56
flutter_localizations_4
import 'package:flutter/foundation.dart' show SynchronousFuture;
import 'package:flutter/material.dart';
import 'i18n.dart';
class I18nDelegate extends LocalizationsDelegate<I18n> {
const I18nDelegate();
@override
bool isSupported(Locale locale) => ['en', 'ja'].contains(locale.languageCode);
@freedive-cebu30
freedive-cebu30 / i18n.dart
Created May 21, 2020 16:56
flutter_localizations_3
import 'package:flutter/material.dart';
class I18n {
I18n(this.locale);
final Locale locale;
static I18n of(BuildContext context) {
return Localizations.of<I18n>(context, I18n);
}
@freedive-cebu30
freedive-cebu30 / pubspec.yaml
Created May 21, 2020 16:48
flutter_localizations_2
name: phexchangestore
description: A new Flutter application.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
@freedive-cebu30
freedive-cebu30 / main.dart
Last active May 21, 2020 16:56
flutter_localizations_1
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'i18n.dart';
import 'i18n_delegate.dart';
void main() {
runApp(