1
0
mirror of https://github.com/nisrulz/flutter-examples.git synced 2026-08-25 09:13:00 +00:00
Files
Nishant Srivastava e143b4c3a2 refactor: split app wrapper from focused example code (pilot)
Apply a consistent structure to 5 example apps (simple_material_app,
stateful_widget, dropdown_button, using_gradient, using_tabs):

- lib/main.dart now contains only the app bootstrap: runApp + a const
  MyApp widget wrapping the app in a MaterialApp.
- lib/example.dart holds the full screen (Scaffold, AppBar, and the
  focused code that demonstrates the example feature), marked with a
  '// Example:' banner comment.

This makes it easy to pinpoint the code that teaches each concept while
keeping the wrapping/chrome code uniform and minimal. Review this pilot
before rolling the pattern out to the remaining apps.
2026-08-18 00:24:22 +02:00

22 lines
500 B
Dart

import 'package:flutter/material.dart';
// Example: the focused code for this app.
// Shows a single centered Text widget inside a plain Material app.
class Example extends StatelessWidget {
const Example({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("Simple Material App"),
),
body: Container(
child: const Center(
child: Text("Hello World!"),
),
),
);
}
}