小编vla*_*aba的帖子

使用自定义 gif 而非微调器刷新指示器

有谁知道如何用 gif 而不是旋转器制作刷新指示器?

尝试使用custom_refresh_indicator库来实现

import 'package:custom_refresh_indicator/custom_refresh_indicator.dart';
import 'package:flutter/material.dart';

class HomePage extends StatefulWidget {
  const HomePage({Key? key}) : super(key: key);

  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(),
      body: Column(
        children: [
          Container(
            color: Colors.blue,
            height: 100,
          ),
          Expanded(
            child: CustomRefreshIndicator(
              onRefresh: () => Future.delayed(
                const Duration(seconds: 3),
              ),
              builder: (
                context,
                child,
                controller,
              ) {
                return AnimatedBuilder(
                  animation: controller,
                  builder: (BuildContext context, _) {
                    return Stack(
                      alignment: …
Run Code Online (Sandbox Code Playgroud)

dart flutter

5
推荐指数
1
解决办法
2865
查看次数

Dart 中“toString”和“as String”之间的区别?

.toStringDart和Dart之间有什么区别吗as String

dart

2
推荐指数
1
解决办法
1751
查看次数

Flutter 在定义 CognitoSignUpOptions 时不断抛出错误

 Error: The argument type 'Map<String, String>' can't be assigned to the parameter type 'Map<CognitoUserAttributeKey, String>'.
Run Code Online (Sandbox Code Playgroud)

当我查找错误时,没有任何相关信息。

在 AWS 文档中,他们推荐了此代码,这会导致错误:

Map<String, String> userAttributes = {
   'email': 'email@domain.com',
   'phone_number': '+15559101234',
   // additional attributes as needed
};

SignUpResult res = await Amplify.Auth.signUp(
   username: 'myusername',
   password: 'mysupersecurepassword',
   options: CognitoSignUpOptions(
     userAttributes: userAttributes
   )
 );
Run Code Online (Sandbox Code Playgroud)

authentication flutter aws-amplify

1
推荐指数
1
解决办法
647
查看次数

标签 统计

dart ×2

flutter ×2

authentication ×1

aws-amplify ×1