Skip to content

Card contructor : 1 required argument(s) expected, but 0 found #21319

@ratsey

Description

@ratsey

Using the example card in the framework yields the above error.

new Card( // 1 required argument(s) expected, but 0 found.
   child: new Column( 
     mainAxisSize: MainAxisSize.min,
     children: <Widget>[
       const ListTile(
         leading: const Icon(Icons.album),
         title: const Text('The Enchanted Nightingale'),
         subtitle: const Text('Music by Julie Gable. Lyrics by Sidney Stein.'),
       ),
       new ButtonTheme.bar( // make buttons use the appropriate styles for cards
         child: new ButtonBar(
           children: <Widget>[
             new FlatButton(
               child: const Text('BUY TICKETS'),
               onPressed: () { /* ... */ },
             ),
             new FlatButton(
               child: const Text('LISTEN'),
               onPressed: () { /* ... */ },
             ),
           ],
         ),
       ),
     ],
   ),
 )
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v0.6.0, on Microsoft Windows [Version 10.0.17134.228], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[√] Android Studio (version 3.1)
[√] IntelliJ IDEA Community Edition (version 2018.1)
[√] VS Code, 64-bit edition (version 1.26.1)
[√] Connected devices (1 available)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions