我在欢迎屏幕中实现了延迟动画,但在我的 flutter 应用程序中出现以下错误。如果我的代码中有错误,请告诉我,我可以纠正并解决此问题。
错误是:
E/flutter (11565): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)]
Unhandled Exception:
'package:flutter/src/animation/animation_controller.dart': Failed
assertion: line 455 pos 7: '_ticker != null':
AnimationController.forward() called after
AnimationController.dispose()
Run Code Online (Sandbox Code Playgroud)
这是我的代码:
E/flutter (11565): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)]
Unhandled Exception:
'package:flutter/src/animation/animation_controller.dart': Failed
assertion: line 455 pos 7: '_ticker != null':
AnimationController.forward() called after
AnimationController.dispose()
Run Code Online (Sandbox Code Playgroud) ElevatedButton(
onPressed: () async {
const url ='https://www.facebook.com';
if (await canLaunch(url)) {
await launch(url,forceWebView: true,enableJavaScript: true);
} else {
// can't launch url
}
},
);
Run Code Online (Sandbox Code Playgroud)
I/UrlLauncher( 7566): component name for https://www.facebook.com is null
Run Code Online (Sandbox Code Playgroud) 
我制作了一个页面NestedScrollView,其主体NestedScrollView是一个容器,用于保存以前请求的数据。但身体NestedScrollView已经溢出了。下面的代码:
NestedScrollView(
controller: _scrollViewController,
headerSliverBuilder:
(BuildContext context, bool innerBoxIsScrolled) {
return <Widget>[
SliverAppBar(
title: new Text(
nama,
style: TextStyle(color: putih),
),
iconTheme: IconThemeData(color: putih),
backgroundColor: colorPrimaryDark,
)
];
},
body: Container(
child: Column(
children: <Widget>[
Container(
color: goldtua,
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Row(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Text(
string.harga,
style: TextStyle(color: putih, fontSize: 24.0),
),
Text(
formatingRupiah(harga),
style: TextStyle(color: putih, fontSize: 24.0),
),
],
),
),
),
Expanded(
child: Padding(
padding: const …Run Code Online (Sandbox Code Playgroud) 我有 2 个类(B和C),我正在尝试创建一个父类型,以便我可以操作type 的A变量。下面的例子工作正常:aA
class A {}
class B extends A {}
class C extends A {}
var b = true;
final A a = b ? C() : B();
Run Code Online (Sandbox Code Playgroud)
但由于某种原因,当A有泛型类型时A<T>,它不起作用
class A<T> {}
class B extends A<int> {}
class C extends A<String> {}
var b = true;
final A a = b ? C() : B(); // <- Error
Run Code Online (Sandbox Code Playgroud)
我收到 linting 错误:
A value of type 'Object' …Run Code Online (Sandbox Code Playgroud)