Flutter drawer and saving/restoring child widget state

I am new to Flutter and I have a question about an internal methods of saving and restoring widget’s state. I develop an app with complex endDrawer with article’s catalog tree (based on ExpansionTile widget). First question It is possible to prevent killing drawer’s child widget after closing and opening it? Second As you can see on video Flutter have an internal methods to save and restore widget state due to screen rotation (it saves for example expansion state and position). It is possible to reuse these methods in my app programatically?

Flutter doctor cannot execute…. to determine the version

! Doctor found issues in 4 categories. Raymonds-MacBook-Air:~ raymondfontaine$ flutter doctor -v [✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Mac OS X 10.14.5 18F132, locale en-US) • Flutter version 1.5.4-hotfix.2 at /Users/raymondfontaine/Developer/flutter • Framework revision 7a4c33425d (3 weeks ago), 2019-04-29 11:05:24 -0700 • Engine revision 52c7a1e849 • Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)

[!] Android toolchain – develop for Android devices (Android SDK version 28.0.3) • Android SDK at /Users/raymondfontaine/Library/Android/sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-28, build-tools 28.0.3 • Java binary at: /usr/lib/jvm/default-java/bin/java ✗ Cannot execute /usr/lib/jvm/default-java/bin/java to determine the version

[!] iOS toolchain – develop for iOS devices (Xcode 10.2.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 10.2.1, Build version 10E1001 ✗ libimobiledevice and ideviceinstaller are not installed. To install with Brew, run: brew update brew install –HEAD usbmuxd brew link usbmuxd brew install –HEAD libimobiledevice brew install ideviceinstaller ✗ ios-deploy not installed. To install: brew install ios-deploy ✗ Brew can be used to install tools for iOS device development. Download brew at https://brew.sh/.

[!] Android Studio (not installed) • Android Studio not found; download from https://developer.android.com/studio/index.html (or visit https://flutter.dev/setup/#android-setup for detailed instructions).

[!] Connected device ! No devices available

Any help would be appreciated

after i had installed dart and flutter tools , this not shown in cmd

C:\Users\Osama Aldawoody>flutter doctor Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, v1.5.4-hotfix.2, on Microsoft Windows [Version 10.0.17134.765], locale en-US) \CreateProcessW failed 193 Unhandled exception: ProcessException: %1 is not a valid Win32 application.

Command: C:\Users\Osama Aldawoody\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l

0 _ProcessImpl._runAndWait (dart:io-patch/process_patch.dart:489:7)

1 _runNonInteractiveProcessSync (dart:io-patch/process_patch.dart:634:18)

2 Process.runSync (dart:io-patch/process_patch.dart:66:12)

3 LocalProcessManager.runSync (package:process/src/interface/local_process_manager.dart:83:20)

4 _runWithLoggingSync (package:flutter_tools/src/base/process.dart:333:48)

5 runSync (package:flutter_tools/src/base/process.dart:306:10)

6 getAdbDevices (package:flutter_tools/src/android/android_device.dart:551:12)

7 AndroidDevices.pollingGetDevices (package:flutter_tools/src/android/android_device.dart:55:53)

8 PollingDeviceDiscovery.devices (package:flutter_tools/src/device.dart:186:52)

9 DeviceManager.getAllConnectedDevices (package:flutter_tools/src/device.dart:114:46)

10 DeviceValidator.validate (package:flutter_tools/src/doctor.dart:705:54)

11 Doctor.startValidatorTasks (package:flutter_tools/src/doctor.dart:129:52)

12 Doctor.diagnose (package:flutter_tools/src/doctor.dart:200:41)

13 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:49:6)

14 Doctor.diagnose (package:flutter_tools/src/doctor.dart:190:24)

15 DoctorCommand.runCommand (package:flutter_tools/src/commands/doctor.dart:48:39)

16 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:49:6)

17 DoctorCommand.runCommand (package:flutter_tools/src/commands/doctor.dart:34:42)

18 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:559:18)

19 _asyncThenWrapperHelper. (dart:async-patch/async_patch.dart:77:64)

20 _rootRunUnary (dart:async/zone.dart:1132:38)

21 _CustomZone.runUnary (dart:async/zone.dart:1029:19)

22 _FutureListener.handleValue (dart:async/future_impl.dart:126:18)

23 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)

24 Future._propagateToListeners (dart:async/future_impl.dart:668:32)

25 Future._complete (dart:async/future_impl.dart:473:7)

26 _SyncCompleter.complete (dart:async/future_impl.dart:51:12)

27 _AsyncAwaitCompleter.complete. (dart:async-patch/async_patch.dart:33:20)

28 _rootRun (dart:async/zone.dart:1124:13)

29 _CustomZone.run (dart:async/zone.dart:1021:19)

30 _CustomZone.bindCallback. (dart:async/zone.dart:947:23)

31 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)

32 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)

33 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:115:13)

34 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:5)

Interação Flutter com javaScript usando OpenLayer 5

Ola pessoal gostaria de saber se vocês conhecem algum plugin para comunicar flutter com java Script, estou trabalhando com mapas off-line usando open layers e utilizando o plugin InAppWebView para mostrar meu mapa local, porem e preciso interagir com suas funções em java Script para adicionar KML, Markers entre outros utilitarios, alguém já utilizou o OpenLayers 5 no flutter? ou se alguém já utilizou o OpenLayers e conseguiu resolver de outras formas a interação fico agradecido.

Como abrir o link de um site ao clicar numa determinada imagem da GridView e como colocar o nome abaixo de cada imagem no FLUTTER?

Bom dia! Estou começando a aprender programação com o flutter, sou bem novato na área. Quero saber como posso abrir o link de algum site, ao ser clicado numa determinada imagem que está na GridView no flutter? Também preciso saber como deixar o nome/texto diferente em cada item da GridView? Segue o código que precisa ser implementado essas funcionalidades: `import ‘package:flutter/material.dart’;

class Settings extends StatelessWidget { @override Widget build(BuildContext context) {

 return Scaffold(      body: GridView.count(       // Create a grid with 2 columns. If you change the scrollDirection to       // horizontal, this would produce 2 rows.       crossAxisCount: 2,       // Generate 100 Widgets that display their index in the List       children: List.generate(6, (index) {         /*return Card (child: Image.asset('images/image$  index.jpg'));*/          return Card(         color: Colors.white,         child: Padding(         padding:         EdgeInsets.only(left: 10.0, right: 10.0, bottom: 10.0, top: 10.0),         child: Container(         alignment: Alignment.center,         child: Column(         crossAxisAlignment: CrossAxisAlignment.start,         children: <Widget>[         Flexible(         child: Image.asset('images/image$  index.jpg',         width: 150,         height: 150,         ),         ),         Padding(         padding: EdgeInsets.all(10.0),         child: Text(         'Título $  index',         maxLines: 1,         softWrap: true,         textAlign: TextAlign.center,         ),         ),         ],         ),         ),         ),         );       }),     ),   ); 

} }`

Poner texto por defecto en formulario flutter

Tengo un formulario en dart tal que asi:

FormBuilderTextField(     attribute: "NombreTitular1",     autofocus: true,     decoration: InputDecoration(     helperText: cliente.getNombre1(),         labelText: "Nombre del titular",     ),     controller: ControllerNombre1,     maxLength: 30,     validators: [         FormBuilderValidators.required(errorText: "Este campo es obligatorio], ), 

Quiero que en el Form me aparezca por defecto un texto con un nombre, pero no se como hacerlo. Lo que quiero es un formulario para que el usuario edite sus datos, pero claro tiene que ver sus antiguos datos para editarlos si no no tiene sentido el formulario. Gracias de antemano.

Dynamic link does not work on iOS version 12 and above – Flutter

I am using Google Dynamic Links for Firebase plugin to implement dynamic link.

I done with the all steps which required to implement deep link.

Everything works fine below iOS version 12 but when updated my iPad to latest iOS version 12.2. It does redirect and open my app. when i do page refresh in the safari it some times open the app.

Future<void> _retrieveDynamicLink() async {     final PendingDynamicLinkData data = await FirebaseDynamicLinks.instance.retrieveDynamicLink();     final Uri deepLink = data?.link;      if (deepLink != null) {       Navigator.pushNamed(context, deepLink.path); // deeplink.path == '/helloworld'     }   } 

Any help will be appreciated. Thanks in advance

the method join isn’t defined flutter sqflite

I have 2 problems according to the following example: https://pub.dartlang.org/packages/sqflite

1) The method join isn’t defined for the class uploadIntoDb

2) Undefined class DeepCollectionEquality

There is my so simple code :

import 'package:flutter/material.dart'; import 'dart:async'; import 'package:sqflite/sqflite.dart';  class UploadPage extends StatefulWidget {   @override   State<StatefulWidget> createState(){     return new UploadPageState();   } }  class UploadPageState extends State<UploadPage>     with SingleTickerProviderStateMixin {   @override   void initState(){     super.initState();   }    @override   Widget build(BuildContext context) {       return null;   }    Future<void> uploadIntoDb(String valueToUpload) async{     // Get a location using getDatabasesPath     var databasesPath = await getDatabasesPath();     String path = join(databasesPath, 'poa.db');   // open the database     Database database = await openDatabase(path, version: 1,         onCreate: (Database db, int version) async {           // When creating the db, create the table           await db.execute(               'CREATE TABLE Test (id INTEGER PRIMARY KEY, name TEXT, value INTEGER, num REAL)');         });  // Insert some records in a transaction     await database.transaction((txn) async {       int id1 = await txn.rawInsert(           'INSERT INTO Test(name, value, num) VALUES("some name", 1234, 456.789)');       print('inserted1: $  id1');       int id2 = await txn.rawInsert(           'INSERT INTO Test(name, value, num) VALUES(?, ?, ?)',           ['another name', 12345678, 3.1416]);       print('inserted2: $  id2');     });  // Update some record     int count = await database.rawUpdate(         'UPDATE Test SET name = ?, VALUE = ? WHERE name = ?',         ['updated name', '9876', 'some name']);     print('updated: $  count');  // Get the records     List<Map> list = await database.rawQuery('SELECT * FROM Test');     List<Map> expectedList = [       {'name': 'updated name', 'id': 1, 'value': 9876, 'num': 456.789},       {'name': 'another name', 'id': 2, 'value': 12345678, 'num': 3.1416}     ];     print(list);     print(expectedList);     assert(const DeepCollectionEquality().equals(list, expectedList));  // Count the records     count = Sqflite         .firstIntValue(await database.rawQuery('SELECT COUNT(*) FROM Test'));     assert(count == 2);  // Delete a record     count = await database         .rawDelete('DELETE FROM Test WHERE name = ?', ['another name']);     assert(count == 1);  // Close the database     await database.close();   } } 

PS: Yes I included the dependency: sqflite: ^1.1.0

Hacer que una sesión se mantenga activa Flutter

Buenas tengo una app donde he creado una ventana para que mis usuarios inicien sesión, los datos los estoy recogiendo desde MySQL por medio del plugin MySQL1.

Recibo bien los datos y me entra en la app bien, el problema es que quiero que se mantenga la sesión activa, es decir, no quiero que cada vez que ejecute la app me pida que inicie sesión denuevo, no se como hacerlo, es mi primera app con sesiones de usuario.

Gracias de antemano por la ayuda.