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:json_annotation/json_annotation.dart'; | |
| part 'timezone_model.g.dart'; | |
| @JsonSerializable() | |
| class TimezoneModel { | |
| @JsonKey(name: 'status') | |
| final String status; | |
| @JsonKey(name: 'message') | |
| final String message; | |
| @JsonKey(name: 'zones') |
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 UIKit | |
| import Flutter | |
| @UIApplicationMain | |
| @objc class AppDelegate: FlutterAppDelegate { | |
| override func application( | |
| _ application: UIApplication, | |
| didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? | |
| ) -> Bool { | |
| GeneratedPluginRegistrant.register(with: self) |
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
| package com.example.sample_time_zone_flutter | |
| import io.flutter.embedding.android.FlutterActivity | |
| import io.flutter.embedding.engine.FlutterEngine | |
| import io.flutter.plugin.common.MethodCall | |
| import io.flutter.plugin.common.MethodChannel | |
| import java.util.* | |
| class MainActivity: FlutterActivity(), MethodChannel.MethodCallHandler { | |
| private val channel = "sample_time_zone_flutter_channel" |
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/services.dart'; | |
| import 'package:timezone/data/latest.dart' as tz; | |
| import 'package:timezone/timezone.dart' as tz; | |
| import 'package:flutter/material.dart'; | |
| void main() { | |
| /// Initialization time zones | |
| tz.initializeTimeZones(); | |
| runApp(App()); |
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: sample_time_zone_flutter | |
| description: Implementation time zone in Flutter app | |
| publish_to: 'none' | |
| version: 1.0.0+1 | |
| environment: | |
| sdk: ">=2.7.0 <3.0.0" | |
| dependencies: | |
| flutter: |
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:io'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:image_picker/image_picker.dart'; | |
| import 'package:tflite/tflite.dart'; | |
| void main() => runApp(App()); | |
| class App extends StatelessWidget { | |
| @override |
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:io'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:image_picker/image_picker.dart'; | |
| import 'package:tflite/tflite.dart'; | |
| void main() => runApp(App()); | |
| class App extends StatelessWidget { | |
| @override |
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'; | |
| class ActionChipExample extends StatelessWidget { | |
| final scaffoldState = GlobalKey<ScaffoldState>(); | |
| @override | |
| Widget build(BuildContext context) { | |
| return Scaffold( | |
| key: scaffoldState, | |
| appBar: AppBar( |
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'; | |
| class FilterChipExample extends StatefulWidget { | |
| @override | |
| _FilterChipExampleState createState() => _FilterChipExampleState(); | |
| } | |
| class _FilterChipExampleState extends State<FilterChipExample> { | |
| final listFilter = <ItemFilter>[ | |
| ItemFilter(1, 'Kurir Instan', false), |
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'; | |
| class ChoiceChipExample extends StatefulWidget { | |
| @override | |
| _ChoiceChipExampleState createState() => _ChoiceChipExampleState(); | |
| } | |
| class _ChoiceChipExampleState extends State<ChoiceChipExample> { | |
| final listChoices = <ItemChoice>[ | |
| ItemChoice(1, '7 Hari'), |