flutter_common_utilities 0.1.7 copy "flutter_common_utilities: ^0.1.7" to clipboard
flutter_common_utilities: ^0.1.7 copied to clipboard

A Flutter utility package for common utils in Flutter App.

# Flutter Common Utilities

"A Flutter utility package providing essential tools for responsive and adaptive UI development in Flutter applications."

## Features

- Responsive utility for different screen sizes and orientations.
- Customizable breakpoints for mobile, tablet, and desktop views.
- Animated transitions between different layouts.

## Getting Started

To use this package, add `flutter_common_utilities` as a dependency in your `pubspec.yaml` file.

```yaml
dependencies:
  flutter_common_utilities: ^latest_version

For help getting started with Flutter, view the online documentation.

Usage #

ResponsiveUtil #

The ResponsiveUtil widget helps you create different layouts for different screen sizes and orientations. It supports mobile, mobile large, tablet, and desktop views with smooth transitions.

import 'package:flutter/material.dart';
import 'package:flutter_common_utilities/flutter_common_utilities.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Responsive Util Example',
      home: HomeScreen(),
    );
  }
}

class HomeScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Responsive Util Example'),
      ),
      body: ResponsiveUtil(
        mobile: MobileHomeScreen(),
        mobileLarge: MobileLargeHomeScreen(),
        tablet: TabletHomeScreen(),
        desktop: DesktopHomeScreen(),
      ),
    );
  }
}

class MobileHomeScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Center(child: Text('Mobile Home Screen'));
  }
}

class MobileLargeHomeScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Center(child: Text('Mobile Large Home Screen'));
  }
}

class TabletHomeScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Center(child: Text('Tablet Home Screen'));
  }
}

class DesktopHomeScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Center(child: Text('Desktop Home Screen'));
  }
}

Example #

An example project demonstrating how to use the responsive_util package can be found in the example directory.

To run the example, navigate to the example directory and use the following command:

flutter run

The example showcases how to use the ResponsiveUtil widget to create a responsive Flutter application that adapts to different screen sizes and orientations.

Additional Information #

Visit the GitHub repository for more information. Feel free to file issues or contribute to the package.

3
likes
0
points
81
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter utility package for common utils in Flutter App.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flutter_common_utilities