Intro to cross-platform development with flutter and dart
topcis:
- Cross-Platform.
- What is flutter.
- Why use flutter for development.
- 1 code base.
- The flutter layout system vs android and ios layout system.
- Hot Reload.
- Flutter Application Anatomy.
- Cross platform allow me to build android & ios applications with the same codebase.
- Flutter is a technology created by google so I can use it to build android, ios, web applications and using dart.
What Is Flutter?
- If I create a native mobile application with android and ios.
- the codebase is doubled:
- because I need code for android using java and codebase for ios using objective c.
- Also when new feature added on android must be written again on ios.
- the codebase is doubled:
- Make a layout design for different screen sizes it quit hard because a lot of android devices made by many companies.
Flutter
- like I mentioned earlier, one codebase allow me to make andorid, ios and web appliation which is make things easier.
- flutter is a toolkit allow me to develop interfaces easily for all screen sizes and devices.
- it come with pre-built widgets to make app layout easy like centering elements and paddings.
- flutter require a blank screen to start working on it (web, android or ios) and flutter start drawing.
- also I can specify how it look on android and look on ios app differently like it’s almost ios app.
- using these widgets can make me build android ios web or desktop apps.
- so basically the app is group of widgets in flutter I use. - by using these widgets I can create an application that look almost like native applications and on different screen sizes using one codebase and without learning new technology.
Why choose Flutter to build a project?
- 1 code base, 1 code to debug and one code to update.
- learn only one thing to develop which is dart.
- normally i need java and android for android development, swift and objective-c for ios apps, web language for web apps and desktop langauge for desktop apps.
- here i need to know only dart.
- Simple layout system, the idea of dealing with layout is coming from web responsive design.
- in order for developer to make sure that user get most out of screen user experience and elements on screen.
- constraints are used to create layout.
- flutter inspired by the web way to deal with layout on different screen sizes.
- the web have very powerful way to deal with screens
- this is very important because when working with android it have a lot of screen sizes, tablets, and a lot more.
- making design for each one.
- Hot Reload unlike android and ios Flutter uses Hot reload, it may take very long time to rerun app around 30s.
- a mechanism where i dont have to re-run my application while developing.
- with flutter as i am updating and saving my app data will appear on screen directly.
- Open source means i can see how the code written by google flutter team and see how it works.
- i can take their code and edit it for my needs.