BEGINNER • UI and Layouts
Sprint: optimize battery usage #2
This lesson focuses on optimize battery usage for a news reader app. Commands: npm run android | expo start | xcrun simctl.
Code Example
// Flutter widget
class HomeScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text("news reader")),
body: Center(child: Text("optimize battery usage")),
);
}
}Commands & References
- npm run android
- expo start
- xcrun simctl
Lab Steps
- Run npm run android
- Implement feature
- Test on device
- Document findings
Exercises
- Add one validation
- Improve one UX flow
- Write one test