Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Flutter at World Expo 2020 Dubai

gerfalcon
October 22, 2022

Flutter at World Expo 2020 Dubai

What do the Eiffel Tower in Paris, the Atomium in Brussels, the Space Needle in Seattle, and Flutter technology have in common?
- They have all participated in a world fair.

In this talk, we will discuss how we built an end-to-end food delivery app using Flutter in just 5 months for the 24 million visitors of Dubai Expo 2020.

Meetup link: https://www.meetup.com/flutter-ad/events/288648552/
Social announcement: https://www.linkedin.com/feed/update/urn:li:activity:6985281908096004097/

gerfalcon

October 22, 2022
Tweet

More Decks by gerfalcon

Other Decks in Technology

Transcript

  1. EXPO 2020 1 October 2021 to 31 March 2022 •

    6 months • 24.1M visits from 178 countries
  2. EXPO 2020 1 October 2021 to 31 March 2022 •

    6 months • 24.1M visits from 178 countries • 200 pavilions
  3. EXPO 2020 1 October 2021 to 31 March 2022 •

    6 months • 24.1M visits from 178 countries • 200 pavilions • 1 opportunity
  4. EXPO talabat kitchen • 2 floors - 2 cloud kitchen

    • 15 different types of cuisines
  5. EXPO talabat kitchen • 2 floors - 2 cloud kitchen

    • 15 different types of cuisines • 30 brands
  6. EXPO talabat kitchen • 2 floors - 2 cloud kitchen

    • 15 different types of cuisines • 30 brands • robot barista
  7. EXPO talabat kitchen • 2 floors - 2 cloud kitchen

    • 15 different types of cuisines • 30 brands • robot barista • smart lockers
  8. EXPO talabat kitchen • 2 floors - 2 cloud kitchen

    • 15 different types of cuisines • 30 brands • robot barista • smart lockers • tala-bots
  9. EXPO talabat kitchen • 2 floors - 2 cloud kitchen

    • 15 different types of cuisines • 30 brands • robot barista • smart lockers • tala-bots • Grab n Go stations
  10. Full app flow Entry point with the Native Android -

    iOS Home screen Menu screen Menu item screen Cart screen Pickup selection map screen Dfsdf
  11. Full app flow Entry point with the Native Android -

    iOS Home screen Menu screen Menu item screen Cart screen Pickup selection map screen Phone number screen Dfsdf
  12. Full app flow Entry point with the Native Android -

    iOS Home screen Menu screen Menu item screen Cart screen Pickup selection map screen Phone number screen Checkout screen Dfsdf
  13. Full app flow Entry point with the Native Android -

    iOS Home screen Menu screen Menu item screen Cart screen Pickup selection map screen Phone number screen Checkout screen Post order screen Dfsdf Added lines of code Android: 4 518 iOS: 1 278 Flutter: 87 838
  14. Tamás Maksa Engineering Manager Tony Fadel Sr. Director Product Guy

    Blackhurst Sr. Product Designer Volodymyr Pavliuk Sr. iOS Engineer Zeinab Abdelmawla Android Engineer Yoshita Bhatia Sr. QA Quentin Gallois Sr. iOS Engineer Maksym Kozachenko Flutter Engineer Csongor Vogel Sr. Android Engineer Zakaria Ouhra Sr. iOS Engineer
  15. Volodymyr Pavliuk Sr. iOS Engineer Zeinab Abdelmawla Android Engineer Quentin

    Gallois Sr. iOS Engineer Maksym Kozachenko Flutter Engineer Csongor Vogel Sr. Android Engineer Zakaria Ouhra Sr. iOS Engineer
  16. Volodymyr Pavliuk Sr. iOS Engineer Zeinab Abdelmawla Android Engineer Quentin

    Gallois Sr. iOS Engineer Maksym Kozachenko Flutter Engineer Csongor Vogel Sr. Android Engineer Zakaria Ouhra Sr. iOS Engineer 178 DAYS
  17. Volodymyr Pavliuk Sr. iOS Engineer Zeinab Abdelmawla Android Engineer Quentin

    Gallois Sr. iOS Engineer Maksym Kozachenko Flutter Engineer Csongor Vogel Sr. Android Engineer Zakaria Ouhra Sr. iOS Engineer April 6 178 DAYS
  18. Volodymyr Pavliuk Sr. iOS Engineer Zeinab Abdelmawla Android Engineer Maksym

    Kozachenko Flutter Engineer Csongor Vogel Sr. Android Engineer Zakaria Ouhra Sr. iOS Engineer April 25 Quentin Gallois Sr. iOS Engineer 159 DAYS
  19. Volodymyr Pavliuk Sr. iOS Engineer Zeinab Abdelmawla Android Engineer Maksym

    Kozachenko Flutter Engineer Csongor Vogel Sr. Android Engineer Zakaria Ouhra Sr. iOS Engineer Quentin Gallois Sr. iOS Engineer May 30 124 DAYS
  20. Volodymyr Pavliuk Sr. iOS Engineer Zeinab Abdelmawla Android Engineer Maksym

    Kozachenko Flutter Engineer Csongor Vogel Sr. Android Engineer Zakaria Ouhra Sr. iOS Engineer Quentin Gallois Sr. iOS Engineer June 7 116 DAYS
  21. Volodymyr Pavliuk Sr. iOS Engineer Zeinab Abdelmawla Android Engineer Maksym

    Kozachenko Flutter Engineer Csongor Vogel Sr. Android Engineer Zakaria Ouhra Sr. iOS Engineer Quentin Gallois Sr. iOS Engineer June 22 101 DAYS
  22. Volodymyr Pavliuk Sr. iOS Engineer Zeinab Abdelmawla Android Engineer Maksym

    Kozachenko Flutter Engineer Csongor Vogel Sr. Android Engineer Zakaria Ouhra Sr. iOS Engineer 101 DAYS Quentin Gallois Sr. iOS Engineer June 22
  23. Volodymyr Pavliuk Sr. iOS Engineer Zeinab Abdelmawla Android Engineer Maksym

    Kozachenko Flutter Engineer Csongor Vogel Sr. Android Engineer Zakaria Ouhra Sr. iOS Engineer 101 DAYS Quentin Gallois Sr. iOS Engineer June 22
  24. Volodymyr Pavliuk Sr. iOS Engineer Zeinab Abdelmawla Android Engineer Maksym

    Kozachenko Flutter Engineer Csongor Vogel Sr. Android Engineer Zakaria Ouhra Sr. iOS Engineer 50 DAYS Quentin Gallois Sr. iOS Engineer Aug 11
  25. Volodymyr Pavliuk Sr. iOS Engineer Zeinab Abdelmawla Android Engineer Maksym

    Kozachenko Flutter Engineer Csongor Vogel Sr. Android Engineer Zakaria Ouhra Sr. iOS Engineer 0 DAYS Quentin Gallois Sr. iOS Engineer Oct 1
  26. Volodymyr Pavliuk Sr. iOS Engineer Zeinab Abdelmawla Android Engineer Maksym

    Kozachenko Flutter Engineer Csongor Vogel Sr. Android Engineer Zakaria Ouhra Sr. iOS Engineer 0 DAYS Quentin Gallois Sr. iOS Engineer Oct 1
  27. Lots of unknowns • When should we enable the Expo

    app? • Which version will be ready for the expo?
  28. Lots of unknowns • When should we enable the Expo

    app? • Which version will be ready for the expo? • Where should we show the pickup stations?
  29. Lots of unknowns • When should we enable the Expo

    app? • Which version will be ready for the expo? • Where should we show the pickup stations? • How can we easily control our Kiosk terminals?
  30. Lots of unknowns • When should we enable the Expo

    app? • Which version will be ready for the expo? • Where should we show the pickup stations? • How can we easily control our Kiosk terminals? ⌛ Feature flags Feature flags Remote configs Feature flags Feature flags Remote configs Remote configs Remote configs Feature flags Feature flags Remote configs Feature flags Feature flags Remote configs Feature flags Remote configs Remote configs Remote configs Remote configs Feature flags Feature flags
  31. Responsive UI @override Widget build(BuildContext context) { final mediaQuery =

    MediaQuery.of(context); final screenHeight = mediaQuery.size.height; /// (...) } Design draft Samsung Galaxy Tab S7 1600 x 2560 pixel 375 x 812 pixel
  32. Responsive UI import 'package:flutter_screenutil/flutter_screenutil.dart'; class App extends StatelessWidget { @override

    Widget build(BuildContext context) { return ScreenUtilInit( designSize: const Size(x, y), builder: () !=> MaterialApp( !!/// (!!...) ), ); } } Design draft Samsung Galaxy Tab S7 1600 x 2560 pixel 375 x 812 pixel
  33. Responsive UI import 'package:flutter_screenutil/flutter_screenutil.dart'; class App extends StatelessWidget { @override

    Widget build(BuildContext context) { return ScreenUtilInit( designSize: const Size(x, y), builder: () => MaterialApp( /// (...) ), ); } } Design draft Samsung Galaxy Tab S7 1600 x 2560 pixel 375 x 812 pixel
  34. Responsive UI import 'package:flutter_screenutil/flutter_screenutil.dart'; class App extends StatelessWidget { @override

    Widget build(BuildContext context) { return ScreenUtilInit( designSize: const Size(375, 812), builder: () !=> MaterialApp( !!/// (!!...) ), ); } } Design draft Samsung Galaxy Tab S7 1600 x 2560 pixel
  35. Responsive UI before after //Adapted to screen width ScreenUtil().setWidth(32) //Adapted

    to screen height ScreenUtil().setHeight(200) //Adapt according to the smaller //of width or height ScreenUtil().radius(200) //Adapter font ScreenUtil().setSp(24) Samsung Galaxy Tab S7 1600 x 2560 pixel
  36. Responsive UI !//Adapted to screen width 32.w !//Adapted to screen

    height 200.h !//Adapt according to the smaller !//of width or height 200.r !//Adapter font 24.sp before after Samsung Galaxy Tab S7 1600 x 2560 pixel
  37. Responsive UI 32.w, 200.h, return SizedBox( width: height: ); before

    after Samsung Galaxy Tab S7 1600 x 2560 pixel
  38. @override Widget build(BuildContext context) { return Listener( onPointerDown: (_) =>

    _handleUserInteraction(), child: widget.child, ); } Session expiration ⌛ • Timer -> Timer(); • Track the user’s gestures ✅
  39. @override Widget build(BuildContext context) { return Listener( onPointerDown: (_) =>

    _handleUserInteraction(), child: widget.child, ); } Session expiration ⌛ • Timer -> Timer(); • Track the user’s gestures ✅ class ExpoInactivityTimer extends StatefulWidget { final Widget child; @override _ExpoInactivityTimerState createState() => _ExpoInactivityTimerState(); } class _ExpoInactivityTimerState extends State<ExpoInactivityTimer> { Timer _timer; }
  40. @override Widget build(BuildContext context) { return Listener( onPointerDown: (_) =>

    _handleUserInteraction(), child: widget.child, ); } Session expiration ⌛ • Timer -> Timer(); • Track the user’s gestures ✅ class ExpoInactivityTimer extends StatefulWidget { final Widget child; @override _ExpoInactivityTimerState createState() !=> _ExpoInactivityTimerState(); } class _ExpoInactivityTimerState extends State<ExpoInactivityTimer> { Timer _timer; }
  41. Session expiration ⌛ • Timer -> Timer(); • Track the

    user’s gestures ✅ ExpoInactivityTimer( child: MaterialApp( !!/// (!!...) ),
  42. ✅ Session expiration ⌛ • Timer -> Timer(); • Track

    the user’s gestures -> Listener() • Navigation ✅
  43. ✅ Session expiration ⌛ • Timer -> Timer(); • Track

    the user’s gestures -> Listener() • Navigation ✅ ExpoInactivityTimer( child: MaterialApp( /// (...) ),
  44. ✅ Session expiration ⌛ • Timer -> Timer(); • Track

    the user’s gestures -> Listener() • Navigation ✅ ExpoInactivityTimer( child: MaterialApp( /// (...) ), @override Widget build(BuildContext context) { Navigator.of(context) .pushNamedAndRemoveUntil(RouteNames.expo, (_) !=> false); }
  45. ✅ Session expiration ⌛ • Timer -> Timer(); • Track

    the user’s gestures -> Listener() • Navigation ✅ ExpoInactivityTimer( child: MaterialApp( !!/// (!!...) ), @override Widget build(BuildContext context) { Navigator.of(context) .pushNamedAndRemoveUntil(RouteNames.expo, (_) => false); }
  46. ✅ Session expiration ⌛ • Timer -> Timer(); • Track

    the user’s gestures -> Listener() • Navigation ✅ final _navigatorKey = GlobalKey<NavigatorState>(); ExpoInactivityTimer( child: MaterialApp( !!/// (!!...) ),
  47. ✅ Session expiration ⌛ • Timer -> Timer(); • Track

    the user’s gestures -> Listener() • Navigation ✅ return ExpoInactivityTimer( child: MaterialApp( initialRoute: initialRoute, navigatorKey: _navigatorKey, /// (...) ), ), ✅
  48. Don’t reinvent the wheel • Map related - google_maps_flutter, geolocator,

    map_launcher • Phone number field - intl_phone_field, phone_number • Responsive UI - flutter_screenutil • QR code generation/scanning - qr_flutter • Shimmer effect - shimmer, • etc.
  49. Volodymyr Pavliuk Sr. iOS Engineer Zeinab Abdelmawla Android Engineer Maksym

    Kozachenko Flutter Engineer Csongor Vogel Sr. Android Engineer Zakaria Ouhra Sr. iOS Engineer Quentin Gallois Sr. iOS Engineer
  50. Same codebase Volodymyr Pavliuk Sr. iOS Engineer Zeinab Abdelmawla Android

    Engineer Maksym Kozachenko Flutter Engineer Csongor Vogel Sr. Android Engineer Zakaria Ouhra Sr. iOS Engineer Quentin Gallois Sr. iOS Engineer
  51. Same codebase = same language Volodymyr Pavliuk Zeinab Abdelmawla Maksym

    Kozachenko Csongor Vogel Zakaria Ouhra Quentin Gallois 🤝
  52. Flutter saved us a lot of time • Everyone could

    speak the same language • We needed to test only one codebase • We could support 3 platforms Csongor Vogel gerfalcon GerfalconVogel EXPO