https://github.com/jogboms/flutter_scale_aware
🎗 Scale-based layouts with a bit more ease, powered by extensions.
https://github.com/jogboms/flutter_scale_aware
dart dartlang design extensions flutter layouts responsive scale screen ui ux
Last synced: 10 months ago
JSON representation
🎗 Scale-based layouts with a bit more ease, powered by extensions.
- Host: GitHub
- URL: https://github.com/jogboms/flutter_scale_aware
- Owner: jogboms
- License: mit
- Created: 2019-10-24T05:42:35.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-06-05T07:21:09.000Z (about 5 years ago)
- Last Synced: 2025-04-22T16:55:51.152Z (about 1 year ago)
- Topics: dart, dartlang, design, extensions, flutter, layouts, responsive, scale, screen, ui, ux
- Language: Dart
- Homepage:
- Size: 827 KB
- Stars: 25
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 🎗 Flutter Scale-Aware
### NOT ADVISED FOR PRODUCTION YET. API AND USAGE IS SUBJECT TO CHANGE
[](https://travis-ci.org/jogboms/flutter_scale_aware) [](https://codecov.io/gh/jogboms/flutter_scale_aware)
Create scale-based layout with a bit more ease. Powered by extensions.
## 🎖 Installing
```yaml
dependencies:
flutter_scale_aware:
git: https://github.com/jogboms/flutter_scale_aware.git
```
### ⚡️ Import
```dart
import 'package:flutter_scale_aware/flutter_scale_aware.dart';
```
## 🎮 How To Use
```dart
import 'package:flutter/material.dart';
import 'package:flutter_scale_aware/flutter_scale_aware.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ScaleAware(
config: ScaleConfig(),
child: MaterialApp(
title: 'Demo',
theme: ThemeData.dark(),
home: DemoPage(title: 'Hello'),
),
);
}
}
class DemoPage extends StatelessWidget {
DemoPage({Key key, this.title}) : super(key: key);
final String title;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text(title)),
body: Center(
child: Container(
height: context.scale(2),
width: context.scale(14.5),
color: Color.red,
child: Text("Hello World", style: TextStyle(fontSize: context.fontScale(16))),
),
),
);
}
}
```
For more info, please, refer to the `main.dart` in the example.
## 🐛 Bugs/Requests
If you encounter any problems feel free to open an issue. If you feel the library is
missing a feature, please raise a ticket on Github and I'll look into it.
Pull request are also welcome.
### ❗️ Note
For help getting started with Flutter, view our online
[documentation](https://flutter.io/).
For help on editing plugin code, view the [documentation](https://flutter.io/platform-plugins/#edit-code).
## ⭐️ License
MIT License