flexi 0.1.2
flexi: ^0.1.2 copied to clipboard
Beside Material and Bootstrap breakpoint systems, Flexi allows to create your own layout easily.
Flutter/Dart compatibility #
Flexi | Flutter | Dart |
---|---|---|
Flexi 0.1.0 - newer | Flutter 2.0.0 - newer | Dart 2.12.0 - newer |
Installing - pubspec.yaml #
dependencies:
flexi: <latest-version>
copied to clipboard
Example 1 - Material Layout #
import 'package:flexi/flexi.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const App());
}
class App extends StatelessWidget {
const App({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return const MaterialApp(
title: 'Flexi Example - Material Layout',
home: Scaffold(body: HomePage()),
);
}
}
class HomePage extends StatelessWidget {
const HomePage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Center(child: Text(context.flexi.breakpoint.id.toString()));
}
}
copied to clipboard