Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't find class 'PreviewProvider' #22

Open
Misaka-Tang opened this issue Aug 22, 2023 · 0 comments
Open

Can't find class 'PreviewProvider' #22

Misaka-Tang opened this issue Aug 22, 2023 · 0 comments

Comments

@Misaka-Tang
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant