将apk上传到Play商店后,收到以下警告。我应该做出哪些更改才能发布带有fld sdk的apk版本以满足64位要求?
查看图像以查看警告消息。
我在pubspec.yamlAny 中添加了字体True Type Font很好用。但是,当我添加Open Type Font它时,它不起作用。
这是我添加字体的方式 pubspec.yaml
fonts:
- family: Kufyan
fonts:
- asset: assets/fonts/Kufyan.otf
Run Code Online (Sandbox Code Playgroud) 我知道如何使用将可见小部件保存到图像中RepaintBoundary
widget我想要的是一种将用户不可见的文件保存为image.
我有一个ListView带shrinkWrap: true。
另外,我申请BouncingScrollPhysics()了ListView
问题是反弹物理仅适用于ListView. 当我滚动到顶部时,它不会显示反弹效果。
我已经在TabBar没有TabBarView. 我使用的是单个选项卡ListView,body因为选择选项卡后的布局对于所有选项卡都是相同的。
我想要实现的是,在列表视图中向左/向右滑动时更改选项卡。我怎样才能做到这一点?
标签栏
TabBar(
indicatorWeight: 3,
indicatorSize: TabBarIndicatorSize.label,
onTap: (index) {
categoryId = newsProvider.categories[index].id;
page = 1;
fetchPosts(newsProvider);
},
isScrollable: true,
tabs: [
for (Category category in newsProvider.categories)
Padding(
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 15),
child: Text(
category.name,
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18),
),
),
],
),
Run Code Online (Sandbox Code Playgroud)
身体
ListView.builder(
padding: EdgeInsets.only(bottom: 60),
physics: BouncingScrollPhysics(),
controller: _scrollController,
itemCount: newsProvider.posts.length,
itemBuilder: (context, index) {
return GestureDetector(
onTap: () {
Navigator.of(context).push(MaterialPageRoute(
builder: (BuildContext context) …Run Code Online (Sandbox Code Playgroud) 我正在尝试禁用上的涟漪效应TextField。
splashColor: Colors.transparent 消除其他小部件上的涟漪效应。
我只想删除上的涟漪效应TextField。
我希望计数器小部件onTap在家里显示widget。另外,animation每次点击都要从头开始。
计数器小部件
class Counter extends StatefulWidget {
@override
_CounterState createState() => _CounterState();
}
class _CounterState extends State<Counter> with SingleTickerProviderStateMixin {
AnimationController animationController;
Animation<double> animation;
@override
void initState() {
super.initState();
animationController = AnimationController(
vsync: this,
duration: Duration(milliseconds: 1000),
)
..addListener(() => setState(() {}));
animation = CurvedAnimation(
parent: animationController,
curve: Curves.elasticOut,
);
animationController.forward();
}
@override
Widget build(BuildContext context) {
return ScaleTransition(
child: Container(
height: 100,
width: 100,
color: Colors.blue,
),
scale: animation,
);
}
}
Run Code Online (Sandbox Code Playgroud)
主页小部件 …
我想slide-down为小部件制作动画。我在互联网上看到了很多例子,但没有一个符合我的要求。这是我需要的。下面是我制作的自定义小部件。
Widget Toast(String content, ToastType type) {
return Column(
children: <Widget>[
Padding(
padding: const EdgeInsets.all(50),
child: Card(
elevation: 10,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5)),
color: ToastColors[type.index],
child: Padding(
padding: const EdgeInsets.only(left: 15, right: 20, top: 10, bottom: 10),
child: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
ToastIcons[type.index],
SizedBox(
width: 15,
),
Flexible(
child: Text(
content,
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.w400,
),
),
),
],
),
),
),
),
],
);
}
Run Code Online (Sandbox Code Playgroud)
这是一个吐司布局。我希望可以从应用程序内的任何地方访问它。这就是为什么我dart为此创建了单独的文件。
我想要的是? 当显示小部件时,我希望 toast 布局向下滑动。我不想循环或反转动画。动画完成后,widget 必须静止在结束位置。
Container当我包裹在小部件ListView内时,我无法设置宽度Expanded。
Widget build(BuildContext context) {
return Center(
child: Column(
children: [
Padding(
padding: EdgeInsets.only(top: 30, bottom: 30),
child: Text(
'Transactions History',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 25,
),
),
),
Expanded(
child: ListView.builder(
physics: BouncingScrollPhysics(),
itemCount: 30,
itemBuilder: (BuildContext context, int index) {
return Container(
width: 100,
color: Colors.red,
child: Card(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 25, vertical: 15),
),
),
);
},
),
),
],
),
);
}
Run Code Online (Sandbox Code Playgroud) Android Q 阻止后台剪贴板访问。有什么办法可以在我的应用程序中使用此服务吗?有没有权限开启这个功能?