Skip to content

Commit

Permalink
refactor: playground
Browse files Browse the repository at this point in the history
  • Loading branch information
nank1ro committed Jan 14, 2025
1 parent 70cb1e3 commit 116f7b0
Show file tree
Hide file tree
Showing 14 changed files with 11 additions and 259 deletions.
10 changes: 0 additions & 10 deletions playground/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import 'package:playground/pages/context_menu.dart';
import 'package:playground/pages/date_picker.dart';
import 'package:playground/pages/dialog.dart';
import 'package:playground/pages/form.dart';
import 'package:playground/pages/image.dart';
import 'package:playground/pages/input.dart';
import 'package:playground/pages/input_otp.dart';
import 'package:playground/pages/popover.dart';
Expand Down Expand Up @@ -124,15 +123,6 @@ final _router = GoRouter(
path: '/avatar',
builder: (context, state) => const AvatarPage(),
),
GoRoute(
path: '/image',
builder: (context, state) {
final style = state.uri.queryParameters['style'] ?? 'local';
return ImagePage(
style: ImageStyle.values.byName(style),
);
},
),
GoRoute(
path: '/tooltip',
builder: (context, state) => const TooltipPage(),
Expand Down
4 changes: 2 additions & 2 deletions playground/lib/pages/button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ class ButtonPage extends StatelessWidget {
onPressed: () {},
),
PlagroundButtonStyle.icon => ShadButton.outline(
icon: const ShadImage(LucideIcons.chevronRight),
icon: const Icon(LucideIcons.chevronRight),
onPressed: () {},
),
PlagroundButtonStyle.textIcon => ShadButton(
onPressed: () {},
icon: const ShadImage(LucideIcons.mail),
icon: const Icon(LucideIcons.mail),
child: const Text('Login with Email'),
),
PlagroundButtonStyle.loading => ShadButton(
Expand Down
4 changes: 2 additions & 2 deletions playground/lib/pages/card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class _CardNotificationsState extends State<CardNotifications> {
width: double.infinity,
icon: const Padding(
padding: EdgeInsets.only(right: 8),
child: ShadImage.square(LucideIcons.check, size: 16),
child: Icon(LucideIcons.check),
),
onPressed: () {},
child: const Text('Mark all as read'),
Expand All @@ -143,7 +143,7 @@ class _CardNotificationsState extends State<CardNotifications> {
),
child: Row(
children: [
ShadImage.square(
Icon(
LucideIcons.bellRing,
size: 24,
color: theme.colorScheme.foreground,
Expand Down
7 changes: 2 additions & 5 deletions playground/lib/pages/context_menu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ class ContextMenuPage extends StatelessWidget {
child: Text('Reload'),
),
const ShadContextMenuItem.inset(
trailing: ShadImage.square(
LucideIcons.chevronRight,
size: 16,
),
trailing: Icon(LucideIcons.chevronRight),
items: [
ShadContextMenuItem(
child: Text('Save Page As...'),
Expand All @@ -47,7 +44,7 @@ class ContextMenuPage extends StatelessWidget {
),
const Divider(height: 8),
const ShadContextMenuItem(
leading: ShadImage.square(LucideIcons.check, size: 16),
leading: Icon(LucideIcons.check),
child: Text('Show Bookmarks Bar'),
),
const ShadContextMenuItem.inset(child: Text('Show Full URLs')),
Expand Down
2 changes: 1 addition & 1 deletion playground/lib/pages/form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class _FormPageState extends State<FormPage> {
ShadInputOTPSlot(),
],
),
ShadImage.square(size: 24, LucideIcons.dot),
Icon(size: 24, LucideIcons.dot),
ShadInputOTPGroup(
children: [
ShadInputOTPSlot(),
Expand Down
50 changes: 0 additions & 50 deletions playground/lib/pages/image.dart

This file was deleted.

7 changes: 2 additions & 5 deletions playground/lib/pages/input.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class _PasswordInputState extends State<PasswordInput> {
obscureText: obscure,
prefix: const Padding(
padding: EdgeInsets.all(4.0),
child: ShadImage.square(size: 16, LucideIcons.lock),
child: Icon(LucideIcons.lock),
),
suffix: ShadButton(
width: 24,
Expand All @@ -69,10 +69,7 @@ class _PasswordInputState extends State<PasswordInput> {
secondaryBorder: ShadBorder.none,
secondaryFocusedBorder: ShadBorder.none,
),
icon: ShadImage.square(
size: 16,
obscure ? LucideIcons.eyeOff : LucideIcons.eye,
),
icon: Icon(obscure ? LucideIcons.eyeOff : LucideIcons.eye),
onPressed: () {
setState(() => obscure = !obscure);
},
Expand Down
2 changes: 1 addition & 1 deletion playground/lib/pages/input_otp.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class InputOTPPage extends StatelessWidget {
ShadInputOTPSlot(),
],
),
ShadImage.square(size: 24, LucideIcons.dot),
Icon(size: 24, LucideIcons.dot),
ShadInputOTPGroup(
children: [
ShadInputOTPSlot(),
Expand Down
2 changes: 1 addition & 1 deletion playground/lib/pages/time_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class PrimaryTimePicker extends StatelessWidget {
child: const ShadTimePicker(
trailing: Padding(
padding: EdgeInsets.only(left: 8, top: 14),
child: ShadImage.square(LucideIcons.clock4, size: 16),
child: Icon(LucideIcons.clock4),
),
),
);
Expand Down
2 changes: 0 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,3 @@ flutter:
weight: 800
- asset: fonts/GeistMono-UltraBlack.otf
weight: 900
assets:
- test/assets/
Binary file removed test/assets/image.jpg
Binary file not shown.
6 changes: 0 additions & 6 deletions test/assets/image.svg

This file was deleted.

Binary file removed test/assets/image.svg.vec
Binary file not shown.
174 changes: 0 additions & 174 deletions test/src/components/image_test.dart

This file was deleted.

0 comments on commit 116f7b0

Please sign in to comment.