Skip to content

Can't find class 'PreviewProvider' #22

@Misaka-Tang

Description

@Misaka-Tang

I try to download and use this extension but it doesn't work. System can't find superclass, here're my codes

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Namer App',
      theme: ThemeData(
        useMaterial3: true,
        colorScheme: ColorScheme.fromSwatch(
          primarySwatch: Colors.blue,
        ).copyWith(secondary: Colors.red),
      ),
      home: Dashboard()
      
    );
  }
}



class WidgetPreview extends PreviewProvider {
 @override
 List<Preview> get previews { 
  return [
     Preview( 
       child: 
     ),
   
  ];
 }
}

and there's no icon to preview.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions