|
1 |
| -<!-- |
2 |
| -This README describes the package. If you publish this package to pub.dev, |
3 |
| -this README's contents appear on the landing page for your package. |
| 1 | +# flutter_smooth_gradient |
4 | 2 |
|
5 |
| -For information about how to write a good package README, see the guide for |
6 |
| -[writing package pages](https://dart.dev/tools/pub/writing-package-pages). |
| 3 | +[](https://pub.dev/packages/flutter_smooth_gradient) [](https://pub.dev/packages/flutter_smooth_gradient/publisher) [](https://opensource.org/licenses/MIT) [](https://pub.dartlang.org/packages/leancode_lint) |
7 | 4 |
|
8 |
| -For general information about developing packages, see the Dart guide for |
9 |
| -[creating packages](https://dart.dev/guides/libraries/create-packages) |
10 |
| -and the Flutter guide for |
11 |
| -[developing packages and plugins](https://flutter.dev/to/develop-packages). |
12 |
| ---> |
| 5 | +`flutter_smooth_gradient` is a package that allows you to create linear gradients that use a specific curve. |
13 | 6 |
|
14 |
| -TODO: Put a short description of the package here that helps potential users |
15 |
| -know whether this package might be useful for them. |
| 7 | +| Status | Comments | |
| 8 | +| :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------: | |
| 9 | +| [](https://github.com/n-bernat/flutter_smooth_gradient/actions/workflows/flutter_tests_stable.yaml) | Current stable Flutter version | |
| 10 | +| [](https://github.com/n-bernat/flutter_smooth_gradient/actions/workflows/flutter_tests_beta.yaml) | Current beta Flutter version | |
| 11 | +| [](https://github.com/n-bernat/flutter_smooth_gradient/actions/workflows/flutter_tests_min.yaml) | The oldest supported Flutter version | |
16 | 12 |
|
17 |
| -## Features |
| 13 | +## Getting started |
18 | 14 |
|
19 |
| -TODO: List what your package can do. Maybe include images, gifs, or videos. |
| 15 | +1. Add this package to your dependencies. |
20 | 16 |
|
21 |
| -## Getting started |
| 17 | +```yaml |
| 18 | +dependencies: |
| 19 | + smooth_gradient: latest_version |
| 20 | +``` |
22 | 21 |
|
23 |
| -TODO: List prerequisites and provide or point to information on how to |
24 |
| -start using the package. |
| 22 | +2. Get the dependencies. |
| 23 | +
|
| 24 | +```sh |
| 25 | +flutter pub get |
| 26 | +``` |
25 | 27 |
|
26 | 28 | ## Usage
|
27 | 29 |
|
28 |
| -TODO: Include short and useful examples for package users. Add longer examples |
29 |
| -to `/example` folder. |
| 30 | +Replace `LinearGradient` with a `SmoothGradient` and optionally provide a curve. |
30 | 31 |
|
31 | 32 | ```dart
|
32 |
| -const like = 'sample'; |
| 33 | +return DecoratedBox( |
| 34 | + decoration: BoxDecoration( |
| 35 | + gradient: SmoothGradient( |
| 36 | + begin: Alignment.topCenter, |
| 37 | + end: Alignment.bottomCenter, |
| 38 | + from: Colors.black, |
| 39 | + to: Colors.white, |
| 40 | + ), |
| 41 | + ), |
| 42 | + child: const SizedBox.square( |
| 43 | + dimension: 100, |
| 44 | + ), |
| 45 | +); |
33 | 46 | ```
|
34 | 47 |
|
35 | 48 | ## Additional information
|
36 | 49 |
|
37 |
| -TODO: Tell users more about the package: where to find more information, how to |
38 |
| -contribute to the package, how to file issues, what response they can expect |
39 |
| -from the package authors, and more. |
| 50 | +- This package requires at least Flutter 3.24 to work. |
| 51 | +- If there are any issues feel free to go to [GitHub Issues](https://github.com/n-bernat/flutter_smooth_gradient/issues) and report a bug. |
| 52 | + |
| 53 | +## Maintainers |
| 54 | + |
| 55 | +- [Nikodem Bernat](https://nikodembernat.com) |
0 commit comments