Skip to content

Example of build a widget using Future.map() #26

Closed Answered by rodydavis
anthonyaquino83 asked this question in Q&A
Discussion options

You must be logged in to vote

Example using AsyncSignal:

import 'dart:math';

import 'package:flutter/material.dart';
import 'package:signals/signals_flutter.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const Example(),
    );
  }
}

class Example extends StatefulWidget {
  const Example({super.key, required this.title});

  final String title;

  @override
  State<Example> createState() => _ExampleState

Replies: 8 comments 15 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@rivella50
Comment options

@rodydavis
Comment options

@rivella50
Comment options

@rodydavis
Comment options

@rivella50
Comment options

Comment options

You must be logged in to vote
2 replies
@rodydavis
Comment options

@rodydavis
Comment options

Comment options

You must be logged in to vote
7 replies
@rivella50
Comment options

@rodydavis
Comment options

@rivella50
Comment options

@rivella50
Comment options

@rodydavis
Comment options

Answer selected by rodydavis
Comment options

You must be logged in to vote
1 reply
@anthonyaquino83
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants