safe_area_fraction 0.0.2 copy "safe_area_fraction: ^0.0.2" to clipboard
safe_area_fraction: ^0.0.2 copied to clipboard

A Flutter widget that applies padding based on a fraction of the safe area dimensions.

example/lib/main.dart

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),
              ),
            ),
          ),
        ),
      ),
    );
  }
}
2
likes
0
points
13
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter widget that applies padding based on a fraction of the safe area dimensions.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_lints

More

Packages that depend on safe_area_fraction