|
| 1 | +# Platform Design |
| 2 | + |
| 3 | +Instead of transliterating widgets one by one between Cupertino and Material, |
| 4 | +Android and iOS apps often follow different information architecture patterns |
| 5 | +that require some design decisions. |
| 6 | + |
| 7 | +This sample project shows a Flutter app that maximizes application code reuse |
| 8 | +while adhering to different design patterns on Android and iOS. On |
| 9 | +Android, it uses Material's [lateral navigation](https://material.io/design/navigation/understanding-navigation.html#types-of-navigation) |
| 10 | +based on a drawer and on iOS, it adheres to Apple Human Interface Guideline's |
| 11 | +[flat navigation](https://developer.apple.com/design/human-interface-guidelines/ios/app-architecture/navigation/) |
| 12 | +by using a bottom tab bar. |
| 13 | + |
| 14 | +Visually, the app presents platform-agnostic content surrounded by |
| 15 | +platform-specific 'chrome'. |
| 16 | + |
| 17 | +# Preview |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | +See https://youtu.be/svhbbFZg1IA for a longer non-gif format. |
| 22 | + |
| 23 | +# Features |
| 24 | + |
| 25 | +## Home |
| 26 | + |
| 27 | +Defines the top level navigation structure of the app and shows the contents |
| 28 | +of the songs tab on launch. |
| 29 | + |
| 30 | +### Android |
| 31 | + |
| 32 | +* Uses the drawer paradigm on the root page. |
| 33 | + |
| 34 | +### iOS |
| 35 | + |
| 36 | +* Uses bottom tab bars with parallel navigation stacks. |
| 37 | + |
| 38 | +## Songs feed tab |
| 39 | + |
| 40 | +Shows platform-agnostic cards that is tappable and that performs a hero |
| 41 | +transition on top of the platform native page transitions. |
| 42 | + |
| 43 | +Both platforms also show a button in their app/nav bar to toggle the platform. |
| 44 | + |
| 45 | +### Android |
| 46 | + |
| 47 | +* Android uses a static pull-to-refresh pattern with an additional refresh |
| 48 | +button in the app bar. |
| 49 | +* The song details page must be popped in order to change tabs on Android. |
| 50 | + |
| 51 | +### iOS |
| 52 | + |
| 53 | +* The iOS songs tab uses a scrollable iOS 11 large title style navigation bar. |
| 54 | +* iOS uses an overscrolling pull-to-refresh pattern. |
| 55 | +* On iOS, parallel tabs are always accessible and the songs tab's navigation |
| 56 | +stack is preserved when changing tabs. |
| 57 | + |
| 58 | +## News Tab |
| 59 | + |
| 60 | +Shows platform-agnostic news boxes. |
| 61 | + |
| 62 | +### Android |
| 63 | + |
| 64 | +* The news tab always appears on top of the songs tab when summoned from the |
| 65 | +drawer. |
| 66 | + |
| 67 | +### iOS |
| 68 | + |
| 69 | +* The news tab appears instead of the songs tab on iOS when switching tabs from |
| 70 | +the tab bar. |
| 71 | + |
| 72 | +## Profile Tab |
| 73 | + |
| 74 | +Shows a number of user preferences. |
| 75 | + |
| 76 | +### Android |
| 77 | + |
| 78 | +* The profile tab appears on top of the songs tab on Android. |
| 79 | +* Has tappable preference cards which shows a multiple-choice dialog on Android. |
| 80 | +* The log out button shows a 2 button dialog on Android. |
| 81 | + |
| 82 | +### iOS |
| 83 | + |
| 84 | +* The profile tab appears instead of the songs tab on iOS. |
| 85 | +* Has tappable preference cards which shows a picker on iOS. |
| 86 | +* The log out button shows a 3 choice action sheet on iOS. |
| 87 | + |
| 88 | +## Settings Tab |
| 89 | + |
| 90 | +Shows a number of app settings via Material switches which auto adapt to the |
| 91 | +platform. |
| 92 | + |
| 93 | +### Android |
| 94 | + |
| 95 | +* The settings is directly available in the drawer on Android since a Material |
| 96 | +Design drawer can fit many tabs. |
| 97 | + |
| 98 | +### iOS |
| 99 | + |
| 100 | +* The settings is accessible from a button inside the profile tab's nav bar on |
| 101 | +iOS. This is a common pattern since there are conventionally more items in the |
| 102 | +drawer than there are tabs. |
| 103 | +* On iOS, the settings page is shown as a full screen dialog instead of a tab |
| 104 | +in the tab scaffold. |
0 commit comments