You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-🏝️**A weekend project**: quickly start a new OSS Dart project with everything set up
26
-
-📚**Learning**: understand best practices for Dart package structure, linting, testing, and CI
27
-
-💻**Production-ready boilerplate**: complete starting point for a high-quality Dart package
25
+
-🎨**Figma-like layouts**: Replicate Figma's Auto Layout behavior in your Flutter apps
26
+
-📱**Responsive UI**: Build flexible, responsive layouts that adapt to different screen sizes
27
+
-🚀**Rapid prototyping**: Quickly create complex layouts with intuitive, declarative syntax
28
28
29
29
30
30
## ✨ Features
31
-
- Unopinionated! A minimal example focused on compliance with Dart guidelines
32
-
- Ready for immediate package publication to [pub.dev](https://pub.dev/)
33
-
- Pre-configured `pubspec.yaml` with recommended fields
34
-
- Multiple example projects in the `example/` directory
35
-
- Linting setup with `lints` package for code quality, following the [Effective Dart](https://dart.dev/guides/language/effective-dart) style guide
36
-
- (Recommended) [MPL-2.0 License](https://opensource.org/licenses/MPL-2.0) for open source projects
37
-
- Unit tests setup with `test` package
38
-
- GitHub Actions workflows for automated testing/QA jobs on push events and PRs
39
-
40
-
This repository is also published as a package on [pub.dev](https://pub.dev/packages/dart_package_template) to make sure it's always kept up to date on the most recent best practices 🫶
41
-
42
-
#### Coming up next:
43
-
- GitHub **Issue/PR templates**
44
-
-**CLI utility** for maintenance/updates (separate repo/package)
31
+
-**🎯 Alignment**: Control child alignment with `alignChildren` and self alignment with `alignSelf`
32
+
-**📏 Padding & Gap**: Set padding around children and gap between them (including auto-spacing with `gap: double.infinity`)
33
+
-**📐 Resizing**: Choose from `fixed`, `hugContents`, or `fillContainer` for horizontal and vertical axes
34
+
-**↔️ Direction**: Layout children horizontally, vertically, or with wrapping
35
+
-**🔄 Overflow handling**: Choose from `none`, `clip`, `visible`, or `scroll` behaviors
- Click the "Use this template" button on the GitHub page for this repository.
54
-
- Fill in the details for your new repository and create it.
55
-
-**🛑✋ IMPORTANT!** Make sure to name your new repository and package with underscore separators, **`just_like_this`** as required by Dart.
56
-
2.**Clone your new repository**
57
-
```bash
58
-
git clone <your-repo-url>
59
-
cd<your-repo-name>
60
-
```
61
-
3. **Update `pubspec.yaml`**
62
-
- Change the `name`, `description`, `homepage`, `repository`, and `issue_tracker` fields to match your package
63
-
- Update the `environment` SDK constraints if necessary
64
-
- Update the same fields in`example/**/pubspec.yaml`
65
-
4. **Rename the entrypoint file**`lib/dart_package_template.dart` to `lib/<your_package_name>.dart` - this is required by Dart package conventions
66
-
5. **Update `README.md`**
67
-
- We recommend you keep the sections, titles and the structure of this README as-is
68
-
- Update the content to reflect your package's purpose, features, and usage
69
-
- Update the badges at the top to reflect your repository and package details
70
-
6. **Update `LICENSE`**
71
-
- We recommend the included [`MPL-2.0 License`](https://opensource.org/licenses/MPL-2.0) for open source packages, as it's business-friendly and allows for both open source and proprietary use
72
-
- If you choose a different license, make sure to update the `LICENSE` file accordingly
73
-
74
-
### Development & Maintenance
75
-
76
-
1. Make sure you have the following enabled in your IDE:
77
-
- Dart SDK
78
-
- Dart/Flutter Linting
79
-
- "Format on Save"
80
-
2. **Write your code!** implement your package functionality in`lib/`, however you like 💙
81
-
- Make sure there are no format/analysis issues reported by your IDE!
82
-
3. **Update & run tests** to ensure everything is working as expected:
83
-
```bash
84
-
dart test
85
-
```
86
-
4. **Commit & push your changes** to your repository. We recommend using a standardized branching strategy (such as [`GitFlow`](https://nvie.com/posts/a-successful-git-branching-model/)) and maintaining a cohesive commit message/history style.
87
-
88
-
5. **Create a Pull Request** to merge your changes into the `main` branch.
89
-
- Make sure all **GitHub Actions** checks pass before merging
90
-
- Once approved, merge the PR into `main`
91
-
92
-
6. **Review & Refine**
93
-
- Regularly review your codebase for improvements, refactoring, and updates to dependencies
94
-
- Keep your documentation up to date in`README.md` and `CHANGELOG.md`
95
-
96
-
97
-
### Publishing
98
-
99
-
1. **Commit the version bump**
100
-
- Update the version in`pubspec.yaml` according to [Semantic Versioning](https://semver.org/)
101
-
- Update the `CHANGELOG.md` with the changes made in this version
102
-
- 🤫 _psst!_ you can use [git log](https://git-scm.com/docs/git-log) command to help you with this, such as `git log --oneline --decorate 1.0.0..HEAD` to see all commits since version 1.0.0
103
-
- Name the commit something like `Bump version to x.y.z`
104
-
- Create a git tag for the new version: `git tag x.y.z`
105
-
106
-
2. **Publish to pub.dev**
107
-
- **IMPORTANT:** Make sure you have an account on [pub.dev](https://pub.dev/) and are logged in via the command line using `dart pub login`
108
-
- First run `dart pub publish --dry-run` to ensure everything is ready for publication
109
-
- If the above command reports any issues, address them before proceeding
110
-
- When ready, run `dart pub publish` to publish your package
111
-
112
-
### Next steps
113
-
114
-
- Share your work! Announce your package on social media, relevant forums, and communities to gain users and feedback.
115
-
- Invite collaborators! Open your repository to contributions from others to help improve and maintain the package.
116
-
- Keep learning and improving! Regularly update your package with new features, bug fixes, and improvements based on user feedback.
-**`AutoLayoutResizing.hugContents`**: Shrink-wrap to fit children
95
+
-**`AutoLayoutResizing.fillContainer`**: Expand to fill available space
121
96
122
-
The Dart/Flutter community is made better by contributions like yours. Make sure to reach out and engage with others in the community, share experiences with other devs, and keep building amazing things!
97
+
### Overflow Behaviors
123
98
124
-
>
125
-
> Our community is warm and welcoming, make sure to act within that spirit! 💖
0 commit comments