我想在flutter中创建一个android tv应用程序,几乎所有的事情都完成了,但有一个问题是我无法聚焦(比如一些弹出式效果或边框更改,任何告诉用户你现在在这个项目上的东西)我们正在列表视图中迭代的项目。image of what I want in app 但是我不能给出这个焦点。我尝试使用FocusScope ->列表视图->焦点节点,但它在第一个和最后一个索引中不能给出确切的行为,而且在有多个列表视图的主页中也不起作用。
model_album.dart class Album {
final int userId;
final int id;
final String title;
Album({
required this.userId,
required this.id,
required this.title,
});
factory Album.fromJson(Map<String, dynamic> json) {
return Album(
userId: json['userId'],
为了尽可能保持我的应用程序的性能以及代码的可测试性和可维护性,我阅读了关于标准化redux状态的文章:
我想知道这样的事情是否有可能在flutter中使用redux。我有这个状态和视图模型:
class CompetitionState {
final LoadingStatus status;
final Competition competition;
}
class Competition {
final List<Competitor> competitors;
}
class CompetitionPageViewModel {
final LoadingS
如果答案是简单的话,我将不胜感激。我是个初学者。
以下是我的完整项目代码:
我的错误是:
E/flutter (17497): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: type 'Null' is not a subtype of type 'String'
E/flutter (17497): #0 new Welcome.fromJson (package:getx_5_rest_api/models/product.dart:33:22)
E/flutt
这是我的pubspec.yaml:
dependencies:
flutter:
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
get:
dev_dependencies:
flutter_test:
sdk: flutter
dependency_overrides:
flutter_test:
升级Flutter SDK和软件包
My-Mac:~ admin$ flutter upgrade
Upgrading Flutter from /Users/admin/Desktop/SDK/flutter...
error: Your local changes to the following files would be overwritten by merge:
packages/flutter/lib/src/services/message_codecs.dart
Please commit your changes or st