Get immediate access to this and 4,000+ other videos and books.

Take your career further with a raywenderlich.com Pro subscription. With unlimited access to over 40+ books and 4,000+ professional videos in a single subscription, it’s simply the best investment you can make in your development career.

Create the Activities Screen Pro

This video was last updated on Aug 30 2022

Create the screen that contains the list of activities that users will see when they open the app. This screen will contain a ListView with the list of activities; from there users will also be able to get to the activity detail screen, which will allow creating a new activity, or updating an existing one.

Contributors

Heads up... You've reached locked video content where the transcript will be shown as obfuscated text.

You can unlock the rest of this video course, and our entire catalogue of books and videos, with a raywenderlich.com Professional subscription.

Now you will create the screen that contains the list of activities that users will see when they open the app.

  late Future<List<Activity>> activities; 
  late FirebaseHelper helper = FirebaseHelper(); 
body: FutureBuilder( 
        future: activities, 
        builder: (context, snapshot) { 
          final List<Activity> activityList = 
              snapshot.hasData ? snapshot.data as List<Activity> 
               : []; 
return ListView.builder( 
  itemCount: activityList.length, 
  itemBuilder: (context, position) { 
    return ListTile( 
      title: Text(activity.description), 
      subtitle: Text( 
          'Date: ${activity.day} - From ${activity.beginTime}' + 
              ' to  ${activity.endTime}'), 

Reviews

Comments