Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Mobile Fest 2018. Александр Сергиенко. Flutter - что за зверь такой?

52 views

Published on

Все больше и больше появляется статей по поводу этого инструмента и, если вы еще не слышали о нем, то вам стоит уделить ему хотя бы немного вашего времени. Думаю, за небольшое время мы сможем познакомиться с плюсами и минусами его использования, а также рассмотреть примеры кода, что даст понимание, как и когда стоит переходить на Flutter.

Published in: Education
  • Be the first to comment

  • Be the first to like this

Mobile Fest 2018. Александр Сергиенко. Flutter - что за зверь такой?

  1. 1. lutter 0.3.2 New way of don’t know what.
  2. 2. Cross platform solutions - 2011 PhoneGap / Apache Cordova (HTML / JavaScript) - 2015 React native (Native views / JavaScript) - 2013 Xamarin (Native views or Common views / C#) - 2013 Ionic (HTML/ TypeScript) - 2015-201? Flutter (Common views / Dart) 2
  3. 3. Flutter features (Material)3
  4. 4. Flutter UI (Cupertino)4
  5. 5. Flutter programming features - Modern language - Hot reload - Clear structure - Simple multithreading - Cross platform - Fast 5
  6. 6. Dart 26 immutable: final name = 'Bob'; const double atm = 1.2 * bar; final constantMap = const { 2: 'helium', 10: 'neon', 18: 'argon', }; mutable: int x = 1; var one = int.parse('1'); var list = [1, 2, 3]; var nobleGases = { 2: 'helium', 10: 'neon', 18: 'argon', };
  7. 7. Dart 27 functions: bool isNoble(int atomicNumber) { return _nobleGases[atomicNumber] != null; } isNoble(atomicNumber) { return _nobleGases[atomicNumber] != null; } bool isNoble(int atomicNumber) => _nobleGases[atomicNumber] != null; ------------------------------------------------------------------------------------------------------ String playerName(String name) => name ?? 'Guest'; String playerName([String name='Guest']) => name;
  8. 8. Dart 2 You can control the flow of your Dart code using any of the following: ● if and else ● for loops ● while and do-while loops ● break and continue ● switch and case ● assert You can also affect the control flow using try-catch and throw, as explained in Exceptions. 8
  9. 9. Dart 2 Asynchrony support: Future<int> lookUpVersion() async { // Do something to get version await for (varOrType identifier in expression) {// Executes each time the stream emits a value.} } var version = await lookUpVersion(); print(version); 9 lookUpVersion() .then( (version){ print(version); } ) .catchError( (error){//handle error} )
  10. 10. Platform channel data types10
  11. 11. API 16API 26 Flutter disadvantages - May not support necessary UI Element (Search view...) - Uses more resources of the device (over 3x heavier on CPU, and uses 3x much memory than native iOS app) - Simple multithreading - May not have some functionality at all - Some plugins may not support one of platforms - Not support vector images - Supports only 15 locales - Platform dependent disadvantages (fonts, multilang) - Size of the final app
  12. 12. Flutter pubspec.yaml works doesn’t work 12
  13. 13. Flutter dependencies cmd> flutter packages get 13
  14. 14. Flutter localizations (at the end of 2017 supports 15 languages) There are 3 ways: 1. Localizations.of<MaterialLocalizations>(context, MaterialLocalizations); 2. notOnlineMessage(String userName, String userGender) => Intl.gender( userGender, male: '$userName is unavailable because he is not online.', female: '$userName is unavailable because she is not online.', other: '$userName is unavailable because they are not online', name: "notOnlineMessage", args: [userName, userGender], desc: "The user is not available to hangout.", examples: const {{'userGender': 'male', 'userName': 'Fred'}, {'userGender': 'female', 'userName' : 'Alice'}}); supports plurals, biditext, and autoextract 3. Your variant (probably json map inside app) 14
  15. 15. References ● https://codelabs.developers.google.com/codelabs/flutter-firebase ● https://codelabs.developers.google.com/codelabs/flutter ● https://medium.com/@develodroid/flutter-iv-mvp-architecture-e4a979d9f47e ● https://pub.dartlang.org/packages/intl#-readme-tab- ● http://dartdoc.takyam.com/docs/tutorials/streams/ ● https://startflutter.com/ ● https://flutter.io/widgets/ ● https://github.com/flutter/plugins ● https://www.dartlang.org/guides/language/language-tour 15
  16. 16. Any questions? Email: alex.khrv@gmail.com Skype: alex_sergienko_s

×