responsive_kakapo 0.0.1
responsive_kakapo: ^0.0.1 copied to clipboard
A Flutter package for responsive UI design, making it easier to adapt your app to different screen sizes.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:responsive_kakapo/responsive_kakapo.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: MyResponsiveWidget(),
);
}
}
class MyResponsiveWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Responsive Kakapo Example'),
),
body: Center(
child: Container(
width: 200.w, // Using the SizeExtension to scale width
height: 100.h, // Using the SizeExtension to scale height
color: Colors.blueAccent,
child: Center(
child: Text(
'Responsive Container',
style: TextStyle(
fontSize: 16.sp, // Using the SizeExtension to scale text
color: Colors.white,
),
textAlign: TextAlign.center,
),
),
),
),
);
}
}
///Eng.Ahmad Ghneem