Posts

Showing posts from May, 2020

Flutter: How to get device details like UUID, deviceName?

We will use  device_info package for finding these details. Use this link to check latest version of the package.  Add  package_info : ^0.4.0+3 in pubspec.yaml file of your project. below  dependencies :    flutter :      sdk : flutter     package_info : ^0.4.0+3 Using next code sample you can retrieve the details. Future<List<String>> getDeviceDetails() async {     String deviceName;     String deviceVersion;     String identifier;     final DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();     try {       if (Platform.isAndroid) {                  var build = await deviceInfoPlugin.androidInfo;         deviceName = build.model;         deviceVersion = build.version.toString();         identifier = build.androidId; //UUID for Android   ...

New to Flutter? Good resources to begin with.

Coming from Android background https://flutter.dev/docs/get-started/flutter-for/android-devs https://codelabs.developers.google.com/codelabs/from-java-to-dart/#0 Coming from iOS background https://flutter.dev/docs/get-started/flutter-for/ios-devs Find out which widget to choose: https://flutter.dev/docs/development/ui/widgets/material https://flutter.dev/docs/development/ui/layout https://flutter.dev/docs/development/ui/widgets How to use Assets? https://flutter.dev/docs/development/ui/assets-and-images Create flavours? https://flutter.dev/docs/deployment/flavors Building widget based on api Response https://medium.com/nonstopio/flutter-future-builder-with-list-view-builder-d7212314e8c9 Building widget events of stream https://codingwithjoe.com/flutter-building-a-widget-with-streambuilder/