Flutter - bootstraponline/meta GitHub Wiki
IDE config
- Preferences | Editor | General | Appearance, check
Show closing labels in Dart source code - Preferences | Editor | Font, set
Sizeto 18 - Preferences | Appearance & Behavior | Appearance, set
ThemetoDarculaand checkUse dark window headers - Preferences | Languages & Frameworks | Flutter, check
Format code on saveandPerform hot reload on save - Preferences | Languages & Frameworks | Flutter, uncheck
Hide closing labels in Dart source code when UI guides are on
IDE shortcuts
-
Ctrl + J - quick docs
-
Option + Enter - wrap with widget
-
https://medium.com/coding-with-flutter/flutter-my-favourite-keyboard-shortcuts-63f6474afc8c
Hide debug banner
- Flutter Inspector | More Actions click
Hide Debug Mode Banner
Path setup
~/.bash_profile
# flutter
export PATH="$PATH:$HOME/flutter/bin"
export PATH="$PATH:$HOME/flutter/.pub-cache/bin"
export PATH="$PATH:$HOME/flutter/bin/cache/dart-sdk/bin"
Flutter Web
Flutter web requires changing imports. Not compatible with published packages.
Channels
flutter channel
Emulator
Error connecting to the service protocol: HttpException: Connection closed before full header was received, uri = http://127.0.0.1:49400/dU8Teio-2x8=/ws
Use emulator on API 28. Q image is currently broken.
Hot reload requires app class
// will hot reload
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp(
home: Center(
child: Text("hello 2"),
),
);
}
}
// will not hot reload (main not re-executed)
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
home: Center(
child: Text("hello"),
),
),
);
}
App icon generation
- https://appicon.co/
- Select
AndroidandiPhone
- Select