safe_area_fraction 0.0.6
safe_area_fraction: ^0.0.6 copied to clipboard
A Flutter widget that applies padding based on a fraction of the safe area dimensions.
import 'package:flutter/material.dart';
import 'package:safe_area_fraction/safe_area_fraction.dart';
void main() => runApp(const ExampleApp());
class ExampleApp extends StatelessWidget {
const ExampleApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: SafeFraction(
heightFraction: 0.1,
widthFraction: 0.05,
child: Container(
color: Colors.blue,
child: const Center(
child: Text(
'Safe Area Fraction Demo',
style: TextStyle(color: Colors.white),
),
),
),
),
),
);
}
}