Skip to content

Commit

Permalink
[adaptive_style] add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco Iapicca committed May 1, 2024
1 parent 5a2f73d commit da32887
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 40 deletions.
15 changes: 3 additions & 12 deletions examples/adaptive_style_example/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
# adaptive_style_example

A new Flutter project.
### an example app for `adaptive_style`

## Getting Started
see more on [pub.dev][pub]

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)

For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
[pub]: https://pub.dev/packages/adaptive_style
54 changes: 27 additions & 27 deletions packages/adaptive_style/README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
<!--
This README describes the package. If you publish this package to pub.dev,
this README's contents appear on the landing page for your package.

For information about how to write a good package README, see the guide for
[writing package pages](https://dart.dev/guides/libraries/writing-package-pages).
[![melos badge][]][melos]
[![license badge][]][license]

For general information about developing packages, see the Dart guide for
[creating packages](https://dart.dev/guides/libraries/create-library-packages)
and the Flutter guide for
[developing packages and plugins](https://flutter.dev/developing-packages).
-->

TODO: Put a short description of the package here that helps potential users
know whether this package might be useful for them.
### adaptive_style

## Features
a collection of widgets to build scalable UI

TODO: List what your package can do. Maybe include images, gifs, or videos.
# WARNING
this package is an early release and under development
breaking changes are most likely to occur

## Getting started
### how does it work?

TODO: List prerequisites and provide or point to information on how to
start using the package.
- wrap your app in a `ScaleRefProvider`
- provide a list of supported sizes
``` dart
ScaleRefProvider(
deviceSizes: const [DeviceSize.iphoneSE],
///...
```
- use `SizeRef` to get
- the closest supported size
- the scale between the device size and the supported size

## Usage
### what's included?

- `AdaptiveWidget` the base to build your own custom adaptive widget
- `AdaptiveStack` just like a `Stack` but builds it's children as an `AdaptiveWidget`
- `AdaptiveAnchorPositioned` a `Positioned` that place itself at one of the parent's edges

TODO: Include short and useful examples for package users. Add longer examples
to `/example` folder.

```dart
const like = 'sample';
```

## Additional information
[melos badge]: https://img.shields.io/badge/maintained%20with-melos-f700ff.svg
[melos]: https://github.com/invertase/melos
[license]: https://opensource.org/licenses/MIT
[license badge]: https://img.shields.io/badge/license-MIT-blue.svg

TODO: Tell users more about the package: where to find more information, how to
contribute to the package, how to file issues, what response they can expect
from the package authors, and more.
2 changes: 1 addition & 1 deletion packages/adaptive_style/lib/adaptive_style.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
library adaptive_style;

export 'src/adaptive_edge_positioned.dart';
export 'src/adaptive_achor_positioned.dart';
export 'src/scale_mediaquery_widget.dart';
export 'src/adaptive_stack.dart';
export 'src/adaptive_widget_builder.dart';
Expand Down

0 comments on commit da32887

Please sign in to comment.