- 🔭 An mobile developer.
- 💻 Focus on Swift, Objective-C, Javascript and Dart.
rannie / flui Goto Github PK
View Code? Open in Web Editor NEWA powerful UI framework for Google Flutter.
Home Page: https://www.flui.xin/en/
License: MIT License
A powerful UI framework for Google Flutter.
Home Page: https://www.flui.xin/en/
License: MIT License
any way to do this?
thanks.
App launches night theme, UI does not change
Originally posted by @mzl1988 in #1 (comment)
You can propose the widgets you want under this issue.
demo code:
`
toast(String value, {String buttonTitle = 'Dismiss', Function onButtonPress}) {
Function dismiss;
dismiss = FLToast.showToast(
text: value,
duration: Duration(seconds: 5),
contentBuilder: (cx){
return FlatButton(
onPressed: () {
if (onButtonPress == null) {
dismiss();
} else {
onButtonPress();
}
},
child: Text(
buttonTitle,
style: TextStyle(color: Colors.amber, fontSize: 18),
),
);
}
);
}
`
FLCupertinoOperationSheet设置backgroundColor无效
。。。。。。。。。。。
There is nothing in the README to indicate why I might choose this over the standard widgets. Please add a paragraph near the top of the README about why I might want to use this project.
FLMarqueeLabel内容滚动的时候,easy_refresh刷新和上拉加载不会响应。
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flui/flui.dart';
class CategoryPage extends StatefulWidget {
CategoryPage({Key key}) : super(key: key);
@override
_CategoryPageState createState() => _CategoryPageState();
}
class _CategoryPageState extends State<CategoryPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('分类')),
body: EasyRefresh(
child: ListView(
children: <Widget>[
FLMarqueeLabel(
text: 'Notice: FLUI is a widget kit for Google Flutter',
style: TextStyle(color: Colors.blueAccent, fontSize: 16),
velocity: 1,
space: 150,
loop: true,
)
],
),
onRefresh: () {},
onLoad: () {},
),
);
}
}```
need callback
能否支持以下按钮
FLLoadingButton.liner
FLLoadingButton.radial
FLLoadingButton.sweep
or
FLGradientButton(loading: true)
E/flutter ( 6877): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: Bad state: No element
E/flutter ( 6877): #0 Iterable.first (dart:core/iterable.dart:520:7)
E/flutter ( 6877): #1 _showToast (package:flui/widgets/toast.dart:186:45)
E/flutter ( 6877): #2 FLToast.showInfo (package:flui/widgets/toast.dart:164:7)
E/flutter ( 6877): #3 FLToast.info (package:flui/widgets/toast.dart:158:46)
E/flutter ( 6877): #4 _LoginPageState._getAccessTokenHandle (package:whale/pages/login/login_page.dart:169:15)
E/flutter ( 6877): <asynchronous suspension>
E/flutter ( 6877): #5 _LoginPageState._buildSignIn.<anonymous closure> (package:whale/pages/login/login_page.dart:407:32)
E/flutter ( 6877): #6 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)
E/flutter ( 6877): #7 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:486:11)
E/flutter ( 6877): #8 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:264:5)
E/flutter ( 6877): #9 BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:199:7)
E/flutter ( 6877): #10 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:467:9)
E/flutter ( 6877): #11 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:76:12)
E/flutter ( 6877): #12 PointerRouter._dispatchEventToRoutes.<anonymous closure> (package:flutter/src/gestures/pointer_router.dart:117:9)
E/flutter ( 6877): #13 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:379:8)
E/flutter ( 6877): #14 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:115:18)
E/flutter ( 6877): #15 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:101:7)
E/flutter ( 6877): #16 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:218:19)
E/flutter ( 6877): #17 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:198:22)
E/flutter ( 6877): #18 GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:156:7)
E/flutter ( 6877): #19 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:102:7)
E/flutter ( 6877): #20 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:86:7)
E/flutter ( 6877): #21 _rootRunUnary (dart:async/zone.dart:1138:13)
E/flutter ( 6877): #22 _CustomZone.runUnary (dart:async/zone.dart:1031:19)
E/flutter ( 6877): #23 _CustomZone.runUnaryGuarded (dart:async/zone.dart:933:7)
E/flutter ( 6877): #24 _invoke1 (dart:ui/hooks.dart:273:10)
E/flutter ( 6877): #25 _dispatchPointerDataPacket (dart:ui/hooks.dart:182:5)
Getting exception of on calling Toast
════════ Exception caught by gesture ═══════════════════════════════════════════
Bad state: No element
flutter --version
Flutter 2.0.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 1d9032c7e1 (5 weeks ago) • 2021-04-29 17:37:58 -0700
Engine • revision 05e680e202
Tools • Dart 2.12.3
FLui: ^0.9.2
Edit: Found Ans need to wrap widget on Provider
https://www.flui.xin/en/widgets/toast.html#fltoastprovider
Flex布局是移动端开发中常用的一个组件,也是最常用的基础组件,希望后续版本可以开发一个Flex布局的组件。
出错代码:
BorderRadius radius = this.borderRadius ?? _isRound()
? BorderRadius.circular(_kCornerRadius)
: null;
运算符优先级没处理好
Flutter版本 1.12.13+hotfix.8
运行报错
想知道接下来会开发那些组件 和 功能
建议建个群
Hi all,
Thanks for using FLUI.
You can leave your app info (app name, icon path, etc) at this issue. Thanks again!
Because flui >=0.9.0 depends on json_annotation ^3.0.1 and neat_periodic_task 2.0.0 depends on json_annotation ^4.0.0, flui >=0.9.0 is incompatible with neat_periodic_task 2.0.0.
So, because new_box depends on both neat_periodic_task 2.0.0 and flui 0.9.2, version solving failed.
pub get failed (1; So, because new_box depends on both neat_periodic_task 2.0.0 and flui 0.9.2, version solving failed.)
marquee如果是滚动的话,好像是无法点击,没法做到原生滚动时可以点击。
版本 flui: 0.9.2
目前的实现如果想加图标会非常不方便,建议flui直接扩展该功能,或者将slaveTextChild交由开发者自己处理,而不是目前固定成Text,局限性很大
Hi, I see you lib and use it in my app but I know that you have forgot to add "enabled" property to FLRaisedButton and FLLoadingButton
Regards
'package:flutter/src/services/text_input.dart': Failed assertion: line 745 pos 12: 'attached': is not true.
由于现在很多时候需要实现明亮和暗黑模式,而两者的要求色彩不同,对比度不同,很难切换,是否可以做一个动态配色?
我见过比较完善的方案是 https://github.com/adobe/leonardo,色彩比较专业,感觉如果用这个就很不错~
个人认为现在的组件文档的api列表都没有,这是一个很糟糕的文档,能否花出一些宝贵时间,整理一下各个组件的api列表呢?
可以以element-ui、ant-design的api列表为例哦!现在组件库没有api列表,真的仅此一家了!
希望适配下 null safety
环境:
flutter SDK - 1.17.0
flui: ^0.9.1
错误
The following assertion was thrown building _OverlayEntryWidget-[LabeledGlobalKey<_OverlayEntryWidgetState>#802fc](dirty, state: _OverlayEntryWidgetState#171e5):
No MediaQuery widget found.
_OverlayEntryWidget widgets require a MediaQuery widget ancestor.
The specific widget that could not find a MediaQuery ancestor was: _OverlayEntryWidget-[LabeledGlobalKey<_OverlayEntryWidgetState>#802fc]
dirty
state: _OverlayEntryWidgetState#171e5
The ownership chain for the affected widget is: "_OverlayEntryWidget-[LabeledGlobalKey<_OverlayEntryWidgetState>#802fc] ← _Theatre ← Overlay ← Stack ← Directionality ← _FLToastDefaultsWidget ← FLToastProvider ← MyApp ← _InheritedProviderScope ← ChangeNotifierProvider ← ⋯"
Typically, the MediaQuery widget is introduced by the MaterialApp or WidgetsApp widget at the top of your application widget tree.
我按照文档使用FLCountStepper组件
The following _TypeError was thrown building Builder:
type 'int' is not a subtype of type 'bool'
会出现以下错误
使用marquee时, hot reload 有时候会造成无法获得findRenderObject
_textWidth =
_textKey.currentContext.findRenderObject().paintBounds.size.width;
1.run the flui demo
2.open the Input page
3.long press the input widget will crash
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.17.0, on Mac OS X 10.15.4 19E287, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.4)
[✓] Android Studio (version 3.6)
[✓] Connected device (2 available)
• No issues found!
比如常用的 筛选、单选、多选、全选等
测试源码
import 'package:flui/flui.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
/// 用户中心页面
class UserSettingPage extends StatefulWidget {
UserSettingPage({Key key}) : super(key: key);
@override
_UserSettingPageState createState() => _UserSettingPageState();
}
class _UserSettingPageState extends State<UserSettingPage> with RouteAware {
// 点击底部退出按钮
willSelectLogout() {
showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return AlertDialog(
content: SingleChildScrollView(
child: ListBody(
children: <Widget>[
Padding(
padding: EdgeInsets.only(top: 40),
),
GestureDetector(
onTap: () {},
child: Text(' 退出登录'),
),
Padding(
padding: EdgeInsets.only(bottom: 20),
),
Padding(
padding: EdgeInsets.only(bottom: 20),
),
GestureDetector(
onTap: () async {
await SystemChannels.platform
.invokeMethod('SystemNavigator.pop');
},
child: Text(' 退出程序'),
),
],
),
),
actions: <Widget>[
FlatButton(
child: Text('取消'),
onPressed: () {
Navigator.of(context).pop();
},
),
],
);
},
).then((val) {
print(val);
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: FLAppBarTitle(
title: '设置',
// subtitle: '(subtitle)',
),
centerTitle: true,
),
body: Container(
child: ListView(
children: [
// 头像
Container(
child: Column(
children: [
Padding(padding: EdgeInsets.only(top: 23)),
GestureDetector(
child: Container(
width: 80,
height: 80,
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(80),
image: DecorationImage(
image: NetworkImage(
'https://www.dogedoge.com/rmt/QjmnZnf7-99_14oATuI2m-o6Gl5lNXUKPLEVtOSdermAm8fTGOx8mchN4?w=212&h=130'),
fit: BoxFit.cover),
)),
onTap: () {},
),
Padding(padding: EdgeInsets.only(bottom: 20)),
GestureDetector(
onTap: () {},
child: Text(
'点击修改头像',
style: TextStyle(fontSize: 12, color: Color(0xFF999999)),
),
)
],
),
),
FLStaticListView(
shrinkWrap: true,
sections: [
FLStaticSectionData(headerTitle: '账号', itemList: [
FLStaticItemData(
title: '账号管理',
accessoryType: FLStaticListCellAccessoryType.accDetail,
onTap: null),
FLStaticItemData(
title: '账号与安全',
accessoryType: FLStaticListCellAccessoryType.accDetail,
onTap: null),
]),
FLStaticSectionData(headerTitle: '设置', itemList: [
FLStaticItemData(
title: '推送通知设置',
accessoryType: FLStaticListCellAccessoryType.accDetail,
accessoryString: '全部通知',
onTap: () => {}),
FLStaticItemData(
title: '护眼模式',
accessoryType: FLStaticListCellAccessoryType.accSwitch,
accItemValue: true,
onButtonPressed: () {
print('onButtonPressed');
},
onTap: () => {print('onTap')},
),
FLStaticItemData(
title: '自动清理缓存',
subtitle: '每 10 天清理一次',
accessoryType: FLStaticListCellAccessoryType.accCheckmark,
onTap: null,
selected: false,
)
]),
FLStaticSectionData(itemList: [
FLStaticItemData(
cellType: FLStaticListCellType.button,
buttonTitle: '退出登录',
buttonTitleColor: Colors.blue,
onButtonPressed: () {
print('button pressed');
}),
FLStaticItemData(
cellType: FLStaticListCellType.button,
buttonTitle: '退出程序',
buttonTitleColor: Colors.red,
onButtonPressed: () {
willSelectLogout();
})
])
],
),
],
),
),
);
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.