docker pull rabbitmq:management
This file contains 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:math'; | |
import 'dart:ui'; | |
import 'package:flutter/material.dart'; | |
import 'package:google_maps_flutter/google_maps_flutter.dart'; | |
void main() { | |
runApp(MyApp()); | |
} |
This file contains 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:app_name/routes.dart'; | |
class MainView extends StatefulWidget { | |
final GlobalKey<NavigatorState> navigatorKey; | |
MainView(this.navigatorKey); | |
@override | |
_MainViewState createState() => _MainViewState(); |
This file contains 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:google_maps_flutter/google_maps_flutter.dart'; | |
import 'package:provider/provider.dart'; | |
import 'package:clippy_flutter/clippy_flutter.dart'; | |
void main() { | |
runApp( | |
ChangeNotifierProvider( |
This file contains 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/cupertino.dart'; | |
import 'package:hooks_riverpod/hooks_riverpod.dart'; | |
import 'package:location/location.dart'; | |
class PersonLocationProvider extends ChangeNotifier { | |
Location _location = new Location(); | |
PermissionStatus _permissionGranted; | |
StreamController<LocationData> currentLocation = StreamController.broadcast(); |
This file contains 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
private fun createNativeView(handle: Long) { | |
FlutterMain.ensureInitializationComplete(this, arrayOf()) | |
val nativeView = FlutterNativeView(this, true) | |
val callback = FlutterCallbackInformation.lookupCallbackInformation(handle) | |
nativeView.runFromBundle(FlutterRunArguments().apply { | |
bundlePath = FlutterMain.findAppBundlePath(this@Service) | |
libraryPath = callback.callbackLibraryPath | |
entrypoint = callback.callbackName |
This file contains 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 MainActivity : FlutterActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
GeneratedPluginRegistrant.registerWith(this) | |
MethodChannel(flutterView, "android_app_retain").apply { | |
setMethodCallHandler { method, result -> | |
if (method.method == "sendToBackground") { | |
moveTaskToBack(true) | |
} |
This file contains 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 MainScreen extends StatefulWidget { | |
State createState() => MainScreenState(); | |
} | |
class MainScreenState extends State<MainScreen> { | |
var _androidAppRetain = MethodChannel("android_app_retain"); | |
@override | |
void initState() { | |
super.initState(); |
This file contains 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:get/get.dart'; | |
import 'package:get_storage/get_storage.dart'; | |
void main() async { | |
WidgetsFlutterBinding.ensureInitialized(); | |
await initialConfig(); | |
final storage = Get.find<StorageService>(); |
#Intro
Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3
Kotlin project website is at kotlin.jetbrains.org.
All the codes here can be copied and run on Kotlin online editor.
Let's get started.
OlderNewer