草庐IT

gui_widgets

全部标签

flutter - 错误 : Could not find the correct Provider above this widget

这个屏幕是一个抽屉屏幕,它采用authblock来为用户提供信息并使他能够注销。尽管我使用了正确的提供程序,但我还是收到了这个错误ThefollowingProviderNotFoundErrorwasthrownbuildingPets4allDrawer(dirty):I/flutter(32011):Error:CouldnotfindthecorrectProviderabovethisPets4allDrawerWidgetI/flutter(32011):Tofix,please:I/flutter(32011):*EnsuretheProviderisanancestor

使用 NineData GUI 创建与修改 ClickHouse 表结构

01前言随着ClickHouse的快速发展,越来越多的开发者关注并在业务中使用ClickHouse。作为开发人员除了在应用中访问数据库、进行业务数据的分析跟进,还有很重要的一个库表结构的设计。但在ClickHouse官方文档推荐的众多第三方开发的可视化管理工具中,不论是商业的还是开源的,绝大多数只关注在其数据的查询、分析、报表呈现、性能等领域,对表结构变更的可视化管理仅DBeaver、DBM有少量支持(前者交互较重,后者仅少量场景的新建支持,可参考两个产品的建表界面)。参考两个产品DBeaver、DBM的建表界面在前面的文章中我们已经介绍过「NineData:强大的ClickHouse图形客户

widget - 如何在 Card 对象上使用 Dismissible

如果我有一个Card对象,我如何在其上使用Dismissable小部件以便当用户刷卡时它执行onDismissed函数,我尝试了以下示例但它要求key的标识符:Widgetbuild(BuildContextcontext){returnnewDismissible(child:newCard(//somecode),key:/*howthisworks*/);}这是否可行? 最佳答案 如docs中所述一个Dismissible需要一个键来将它与其他Dismissible区分开来。IftheDismissibleisalistite

widget - 如何在 Card 对象上使用 Dismissible

如果我有一个Card对象,我如何在其上使用Dismissable小部件以便当用户刷卡时它执行onDismissed函数,我尝试了以下示例但它要求key的标识符:Widgetbuild(BuildContextcontext){returnnewDismissible(child:newCard(//somecode),key:/*howthisworks*/);}这是否可行? 最佳答案 如docs中所述一个Dismissible需要一个键来将它与其他Dismissible区分开来。IftheDismissibleisalistite

Flutter MaterialApp Widget 参数中的本地化

按照1上的教程进行操作和2我正在尝试为我的flutter应用程序设置本地化。效果很好,我可以使用I18n.of(context).trans()访问我的小部件中的翻译字符串。但是我不知道如何访问MaterialApp中的翻译顶部小部件:import'package:flutter/material.dart';import'package:flutter_app/i18n/i18n.dart';import'package:flutter_app/views/menu.dart';import'package:flutter\_localizations/flutter\_locali

Flutter MaterialApp Widget 参数中的本地化

按照1上的教程进行操作和2我正在尝试为我的flutter应用程序设置本地化。效果很好,我可以使用I18n.of(context).trans()访问我的小部件中的翻译字符串。但是我不知道如何访问MaterialApp中的翻译顶部小部件:import'package:flutter/material.dart';import'package:flutter_app/i18n/i18n.dart';import'package:flutter_app/views/menu.dart';import'package:flutter\_localizations/flutter\_locali

widget - 带有嵌套 TabBarView 的 Flutter ListView

我正在尝试布局我的flutter应用程序,使其看起来像:-ListView-WidgetA-DefaultTabBarController-Column-TabBar-Expanded-TabBarView-WidgetB-WidgetC使整个屏幕可滚动,WidgetsA、B、C的内容可以改变,屏幕高度不固定。我能够让它工作的唯一方法是做类似的事情:-ListView-WidgetA-Container(withfixedheight)-Column-Expanded-DefaultTabBarController-Column-TabBar-Expanded-TabBarView-W

widget - 带有嵌套 TabBarView 的 Flutter ListView

我正在尝试布局我的flutter应用程序,使其看起来像:-ListView-WidgetA-DefaultTabBarController-Column-TabBar-Expanded-TabBarView-WidgetB-WidgetC使整个屏幕可滚动,WidgetsA、B、C的内容可以改变,屏幕高度不固定。我能够让它工作的唯一方法是做类似的事情:-ListView-WidgetA-Container(withfixedheight)-Column-Expanded-DefaultTabBarController-Column-TabBar-Expanded-TabBarView-W

user-interface - 如何将Widget注入(inject)自定义子Widget并使用子Widgets迭代索引?

我正在构建一个flutter应用程序。我已经构建了一个带有构造函数的类。我制作了构造函数,因此我可以自定义我的ListTile,因为我将此类用于多个页面,每次我都需要更改文本颜色,有时甚至添加一个onTap函数。classAppListextendsStatefulWidget{@overrideAppListStatecreateState()=>AppListState();AppList({Keykey,this.child}):super(key:key);finalWidgetchild;}classAppListStateextendsState{Widgetchild;L

user-interface - 如何将Widget注入(inject)自定义子Widget并使用子Widgets迭代索引?

我正在构建一个flutter应用程序。我已经构建了一个带有构造函数的类。我制作了构造函数,因此我可以自定义我的ListTile,因为我将此类用于多个页面,每次我都需要更改文本颜色,有时甚至添加一个onTap函数。classAppListextendsStatefulWidget{@overrideAppListStatecreateState()=>AppListState();AppList({Keykey,this.child}):super(key:key);finalWidgetchild;}classAppListStateextendsState{Widgetchild;L