-
Notifications
You must be signed in to change notification settings - Fork 609
Open
Labels
type-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
How would you categorize your suggested enhancement?
New sample
Suggestion
Most of the time, developers use DartPad to test quick proofs of concept. However, the current default Flutter sample (the classic counter app) is not the smallest possible template. It includes configuration that isn't necessary for a minimal example, such as:
- Custom ThemeData
- debugShowCheckedModeBanner override
- The extra `_MyHomePageState` class and its boilerplate
This makes the sample heavier than a "Hello World" needs to be, especially when prototyping.
Proposal: Introduce a minimal Flutter template, essentially the same output generated by `flutter create --empty`.
This would provide a lightweight starting point for DartPad users who just want a simple widget tree without additional structure or configuration.
A minimal example (for reference) would look like:
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(
home: Scaffold(
body: Center(child: Text('Hello World')),
),
);
}
}
Benefits of this sample over the Counter:
- Faster iteration when testing ideas
- Reduces cognitive load for beginners
- Matches the minimal template already supported by the Flutter CLI (--empty)
Metadata
Metadata
Assignees
Labels
type-enhancementA request for a change that isn't a bugA request for a change that isn't a bug