搜索插件、代码仓与 APP 分类

GitHub 代码仓nijatumuyev/flexify

flexify

这个 Flutter 包可帮助您轻松适应不同屏幕尺寸的应用程序。使用简单,它为开发者提供了根据设备尺寸自动调整界面的能力。使用此包,您的应用程序在从小型手机到大型平板电脑的各种设备上都能呈现出色效果。

flexify 项目封面
星标
6
复刻
0
最近推送(UTC)
2024年6月16日
项目状态
未归档

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

Flexify

Flexify is a comprehensive Flutter package that simplifies the creation of responsive user interfaces and enhances navigation with customizable animations. It allows you to easily adapt your app's layout to various screen sizes while providing a smooth and visually appealing navigation experience. With Flexify, scaling widgets proportionally and implementing advanced navigation transitions become effortless, making it an indispensable tool for Flutter developers.

Features

  • Responsive Design: Scale your UI elements based on the design dimensions you specify.
  • Customizable Navigation: Navigate between screens with various animation options.
  • Cross-Platform Support: Works seamlessly with both MaterialApp and CupertinoApp.

Installation

Add the following line to your pubspec.yaml file:

dependencies:
  flexify: ^2.1.1

Usage

  • Initialize :
import 'package:flutter/material.dart';
import 'package:flexify/flexify.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    //Wrap your app with Flexify for initialize
    return Flexify(
      designWidth: 375,
      designHeight: 812,
      app: MaterialApp(
        home: ExampleScreen(),
      ),
    );
  }
}
  • Responsive designing :
class FlexifyResponsiveWidget extends StatelessWidget {
  const ExampleScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Container(
              width: 250.rw, //responsive width
              height: 250.rh, //responsive height
              decoration: BoxDecoration(
                color: Colors.blue,
                borderRadius: BorderRadius.circular(25.rs), // responsive size
              ),
              child: Center(
                child: Text(
                  'This is a Responsive Text',
                  style: TextStyle(
                    fontSize: 22.rt, // responsive font-size
                    fontWeight: FontWeight.w700,
                  ),
                ),
              ),
            ),
            20.verticalSpace, // SizedBox(height:20.rh) responsive vertical space
            20.horizontalSpace, // SizedBox(width: 20.rw) responsive horizontal space
          ],
        ),
      ),
    );
  }
}
  • Easy navigations with animations :
Flexify.go(
  NewScreen(),
  animation: FlexifyRouteAnimations.fade,
  duration: Duration(milliseconds: 500),
);

Flexify.goRemove(
  NewScreen(),
  animation: FlexifyRouteAnimations.slide,
  duration: Duration(milliseconds: 500),
);

Flexify.goRemoveAll(
  NewScreen(),
  animation: FlexifyRouteAnimations.scale,
  duration: Duration(milliseconds: 500),
);

Flexify.back();
  • Available Animations :
FlexifyRouteAnimations.fade
FlexifyRouteAnimations.slide
FlexifyRouteAnimations.scale
FlexifyRouteAnimations.rotate
FlexifyRouteAnimations.zoom
FlexifyRouteAnimations.size
FlexifyRouteAnimations.elastic
FlexifyRouteAnimations.flip
FlexifyRouteAnimations.slideFromBottom,
FlexifyRouteAnimations.customFadeScale,
FlexifyRouteAnimations.blur,
FlexifyRouteAnimations.slideAndFade,
FlexifyRouteAnimations.rotateAndScale,
FlexifyRouteAnimations.flipAndFade,
Nijat Umuyev GitHub avatar
GitHub 作者

Nijat Umuyev ↗

语言Dart

分类

此仓库发布的插件

使用的依赖

依赖清单 3 项

  • flutter{"sdk":"flutter"}
  • flutter_test开发依赖{"sdk":"flutter"}
  • flutter_lints开发依赖^4.0.0

如何选择适合项目的代码仓?

先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。

  1. 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
  2. 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
  3. 使用前在 GitHub 核对 README、许可证与 Issues。

来源与维护

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗