Giter Club home page Giter Club logo

flutter-template-perfect's Introduction

template(模板)

A new Flutter project template with Null-safety.(flutter 完整商用项目模板).

Getting Starter(开始)

# run dev
> flutter run
# run with Specify entry
> flutter run --target ex/exMain.dart
# build android apk
> flutter build apk

Features(特色)

  • Automatic generation model : route, get_it (自动生成模型:自动生成路由,自动注册服务,自动生成模型及转换方法)
  • Bluetooth : search, connect, read/write (蓝牙:搜索,连接硬件,读写数据)
  • Map ( 地图 )
  • Canvas Chart( 图表 )
  • Push ( 极光推送 )
  • Webview
  • MusicXML Score : render, play ( musicxml 加载五线谱: 渲染,播放 )

Core functions(核心功能)

  • stacked (MVVM 架构)
  • route (路由)基于 get ,由 build_runner 自动生成 ,
  • service (服务)基于 get_it, stacked_service 生成,内置十种基础懒加载服务 [NavigationService,DialogService,BottomSheetService,SnackbarService] [Connectivity,OpenLinkService,ShareService,FileHelperImpl,KeyStorageService...]
  • model (模型)基于 built_value ,由 build_runner 自动生成
  • localization (国际化)基于 flutter_localizations,内置中英文 [en,zh],只需在 assets/lang 定义
  • common utils(常用函数)位于 utils,内置常见颜色,尺寸[Colour,Distance,validators]

Automatic generation model (自动生成模型)

flutter packages pub run build_runner build --delete-conflicting-outputs

flutter packages pub run build_runner watch

Adaptation (适配)

https://juejin.cn/post/6844904176489594893

Material 设计规范:状态栏、导航栏、ListTile 高度分别为 24、56、56

dp 值 = px 值 / (density/160dpi)

ui/views/start_up_view.dart

// 初始化缩放比例
ScreenUtil.init(
  BoxConstraints(
    maxWidth: MediaQuery.of(context).size.width,
    maxHeight: MediaQuery.of(context).size.height,
  ),
  designSize: Size(750, 1334), // 设计稿尺寸
  orientation: Orientation.portrait,
);

flutter-template-perfect's People

Contributors

ifredom avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.