base library

One code, two mode, use cupertino's widgets on ios, use material's widget on android or fuchsia.

Classes

BaseActionSheet
BaseAppBar use CupertinoActionSheet by cupertino *** use cupertino = { forceUseMaterial: true } force use custom BottomSheet on cuperitno. use custom BottomSheet by material *** use material = { forceUseCupertino: true } force use CupertinoActionSheet on material.
BaseActionSheetAction
BaseAppBar use CupertinoActionSheetAction by cupertino *** use cupertino = { forceUseMaterial: true } force use FlatButton on cuperitno. use InkWell by material, must has a Material Widget ancestor *** use material = { forceUseCupertino: true } force use CupertinoActionSheetAction on material.
BaseAlertDialog
BaseAlertDialog use CupertinoAlertDialog by cupertino *** use cupertino = { forceUseMaterial: true } force use AlertDialog on cuperitno. use AlertDialog by material *** use material = { forceUseCupertino: true } force use CupertinoAlertDialog on material.
BaseApp
BaseAppBar theme, use cupertinoTheme by cupertino,use materialTheme by material. use CupertinoApp by cupertino *** use cupertino = { forceUseMaterial: true } force use MaterialApp on cuperitno. use MaterialApp by material *** use material = { forceUseCupertino: true } force use CupertinoApp on material.
BaseAppBar
BaseAppBar use CupertinoNavigationBar by cupertino *** use cupertino = { forceUseMaterial: true } force use AppBar on cuperitno. use AppBar by material *** use material = { forceUseCupertino: true } force use CupertinoNavigationBar on material.
BaseBarItem
BaseBarItem use BottomNavigationBarItem by cupertino *** use cupertino = { forceUseMaterial: true } force use BottomNavigationBarItem on cuperitno. use BottomNavigationBarItem by material *** use material = { forceUseCupertino: true } force use BottomNavigationBarItem on material.
BaseButton
BaseButton use CupertinoButton or CupertinoButton.filled by cupertino *** use cupertino = { forceUseMaterial: true } force use MaterialButton or FlatButton or OutlineButton or RaisedButton on cuperitno. use MaterialButton or FlatButton or OutlineButton or RaisedButton by material *** use material = { forceUseCupertino: true } force use CupertinoButton or CupertinoButton.filled on material.
BaseClass
基础类 cupertino使用buildByCupertino方法构建,material使用buildByMaterial方法构建 *** 参数 1、cupertino模式:从cupertino里取对应的值,取不到则取公共参数 2、material模式:从material里取对应的值,取不到则取公共参数 3、cupertino模式下可以使用 cupertino = { forceUseMaterial: true } 强制使用material模式构建 使用 cupertino = { disabled: true } 禁止构建 4、material模式下可以使用 material = { forceUseCupertino: true } 强制使用cupertino模式构建 使用 material = { disabled: true } 禁止构建 [...]
BaseDialogAction
BaseDialogAction use CupertinoDialogAction by cupertino *** use cupertino = { forceUseMaterial: true } force use FlatButton on cuperitno. use FlatButton by material *** use material = { forceUseCupertino: true } force use CupertinoDialogAction on material.
BaseIcon
use Icon by cupertino *** use cupertino = { forceUseMaterial: true } force use Icon on cuperitno. use Icon by material *** use material = { forceUseCupertino: true } force use Icon on material.
BaseIconButton
BaseIconButton use CupertinoButton by cupertino *** use cupertino = { forceUseMaterial: true } force use IconButton on cuperitno. use IconButton by material *** use material = { forceUseCupertino: true } force use CupertinoButton on material.
BaseIndicator
BaseIndicator use CupertinoActivityIndicator by cupertino *** use cupertino = { forceUseMaterial: true } force use CircularProgressIndicator on cuperitno. use CircularProgressIndicator by material *** use material = { forceUseCupertino: true } force use CupertinoActivityIndicator on material.
BaseRefresh
BaseIndicator use CustomScrollView + CupertinoSliverRefreshControl by cupertino *** use cupertino = { forceUseMaterial: true } force use RefreshIndicator on cuperitno. use RefreshIndicator by material *** use material = { forceUseCupertino: true } force use CupertinoSliverRefreshControl on material.
BaseRoute<T>
BaseRoute use CupertinoPageRoute or CupertinoButton.filled by cupertino *** use cupertino = { forceUseMaterial: true } force use MaterialPageRoute on cuperitno. use MaterialPageRoute *** use material = { forceUseCupertino: true } force use CupertinoPageRoute on material.
BaseScaffold
BaseScaffold use CupertinoPageScaffold by cupertino, tab's scaffold use CupertinoTabScaffold *** use cupertino = { forceUseMaterial: true } force use Scaffold on cuperitno. use Scaffold by material *** use material = { forceUseCupertino: true } force use CupertinoPageScaffold/CupertinoTabScaffold on material.
BaseScrollBar
BaseScrollBar use CupertinoScrollbar by cupertino *** use cupertino = { forceUseMaterial: true } force use Scrollbar on cuperitno. use Scrollbar by material *** use material = { forceUseCupertino: true } force use CupertinoScrollbar on material.
BaseSection
BaseSection use custom Container by cupertino or material
BaseSlider
BaseSlider cupertino,use CupertinoSlider *** use cupertino = { forceUseMaterial: true } force use Slider material,use Slider *** use material = { forceUseCupertino: true } force use CupertinoSlider
BaseState<T extends BaseStatefulWidget>
BaseStatefulWidget
基础状态组件 cupertino使用buildByCupertino方法构建,material使用buildByMaterial方法构建 *** 参数 1、cupertino模式:从cupertino里取对应的值,取不到则取公共参数 2、material模式:从material里取对应的值,取不到则取公共参数 3、cupertino模式下可以使用 cupertino = { forceUseMaterial: true } 强制使用material模式构建 使用 cupertino = { disabled: true } 禁止构建 4、material模式下可以使用 material = { forceUseCupertino: true } 强制使用cupertino模式构建 使用 material = { disabled: true } 禁止构建 [...]
BaseStatelessWidget
基础无状态组件 cupertino使用buildByCupertino方法构建,material使用buildByMaterial方法构建 *** 参数 1、cupertino模式:从cupertino里取对应的值,取不到则取公共参数 2、material模式:从material里取对应的值,取不到则取公共参数 3、cupertino模式下可以使用 cupertino = { forceUseMaterial: true } 强制使用material模式构建 使用 cupertino = { disabled: true } 禁止构建 4、material模式下可以使用 material = { forceUseCupertino: true } 强制使用cupertino模式构建 使用 material = { disabled: true } 禁止构建 [...]
BaseSwitch
基础切换按钮
BaseTabBar
BaseTabBar use CupertinoTabBar by cupertino *** not support cupertino = { forceUseMaterial: true }. use BottomNavigationBar by material *** not support material = { forceUseCupertino: true }.
BaseTabScaffold
BaseTabScaffold use CupertinoTabScaffold by cupertino *** use cupertino = { forceUseMaterial: true } to force use Scaffold material,use Scaffold by material *** use material = { forceUseCupertino: true } to force use CupertinoTabScaffold
BaseTextField
use CupertinoTextField by cupertino *** use cupertino = { forceUseMaterial: true } force use TextField on cuperitno. use TextField by material *** use material = { forceUseCupertino: true } force use CupertinoTextField on material.
BaseTile
BaseTile use custom InkWell by cupertino *** use cupertino = { forceUseMaterial: true } force use ListTile on cuperitno. use ListTile by material *** use material = { forceUseCupertino: true } force use custom InkWell on material.
CustomMaterialWidget
当cupertino模式需要用到material组件时使用
CustomSplashFactoryWidget
自定义SplashFactory的Material组件
RandomColor
WithoutSplashFactory
去除水波纹效果,但还是有200毫秒的延迟高亮

Constants

disabled → const String
如何使用 cupertino: { 'disabled': true } [...]
'disabled'
forceUseCupertino → const String
material: { 'forceUseCupertino': true } 强制使用cupertino组件,在参数material中使用,慎用,后续可能会删除
'forceUseCupertino'
forceUseMaterial → const String
组件之间是有关联性的,如Material组件很多要求要有Material Widget祖先, 单组件设置forceUseMaterial或forceUseCupertino可能会发生无法预料的错误 如需更改模式,建议直接在app级别上修改整个app的模式(设置targetPlatform参数) [...]
'forceUseMaterial'

Properties

basePlatform TargetPlatform
read / write
useCupertino → bool
build by Cupertino
read-only
useMaterial → bool
build by Material
read-only
withoutSplashOnCupertino ↔ bool
read / write

Functions

isDark(Color color) → bool
isLight(Color color) → bool
pushBaseRoute<T extends Object>(BaseRoute<T> baseRoute, BuildContext context, { bool rootNavigator: false bool nullOk: false }) → Future<T>
pushBaseRouteAndRemoveUntil<T extends Object>(BaseRoute<T> baseRoute, BuildContext context, { bool rootNavigator: false, bool nullOk: false, RoutePredicate predicate }) → Future<T>
setPlatform({TargetPlatform targetPlatform, bool withoutSplashOnCupertino: true }) → void
set the platform
showBaseAlertDialog<T>(BaseAlertDialog alertDialog, BuildContext context, { bool barrierDismissible: true }) → Future<T>