Can't find class 'PreviewProvider'
Misaka-Tang opened this issue · comments
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.