Skip to content

Instantly share code, notes, and snippets.

@shafayathossain
Last active October 20, 2025 22:54
Show Gist options
  • Select an option

  • Save shafayathossain/0c752e9099c6695a4250f85a95e440e9 to your computer and use it in GitHub Desktop.

Select an option

Save shafayathossain/0c752e9099c6695a4250f85a95e440e9 to your computer and use it in GitHub Desktop.
Flutter Preview - Preview Function
@Preview(
name: 'Simple Widget',
size: Size(401, 200),
localizations: arabicLocalizations,
wrapper: materialAppWrapper,
textScaleFactor: 4.0 // <-- 5. Adjust text scale factor
)
Widget previewSimpleWidget() {
return Builder(
builder: (context) {
final localizations = AppLocalizations.of(context)!;
return Center(
child: SimpleWidget(
text: localizations.settings,
icon: Icons.settings,
),
);
}
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment