Skip to content

Commit

Permalink
refactor: use Material design instead of hardcoding
Browse files Browse the repository at this point in the history
  • Loading branch information
kkweon committed Jun 20, 2021
1 parent b4d6c23 commit e53026b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
10 changes: 8 additions & 2 deletions client/lib/custom_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ class CustomTheme extends ChangeNotifier {

static ThemeData _themeData(ThemeData baseTheme, ColorScheme colorScheme) {
final textTheme = baseTheme.textTheme
.copyWith(headline1: _kHeadline1)
.copyWith(
headline1: _kHeadline1,
// main_screen에서 키워드에 사용됨
subtitle2: TextStyle(
fontSize: 14,
color: colorScheme.onSurface.withAlpha(150),
fontStyle: FontStyle.italic))
.apply(displayColor: colorScheme.onBackground);

return baseTheme.copyWith(colorScheme: colorScheme, textTheme: textTheme);
Expand All @@ -46,4 +52,4 @@ class CustomTheme extends ChangeNotifier {
Icon get icon => _isDarkMode
? const Icon(Icons.dark_mode_outlined)
: const Icon(Icons.light_mode_outlined);
}
}
5 changes: 1 addition & 4 deletions client/lib/widgets/detail/abstract.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,11 @@ class PaperAbstractWidget extends StatelessWidget {
paper.abstract,
overflow: TextOverflow.fade,
softWrap: true,
style: const TextStyle(
fontSize: 17,
),
))),
const Positioned(
bottom: -10, child: Icon(Icons.keyboard_arrow_down, size: 50))
])
],
));
}
}
}
4 changes: 2 additions & 2 deletions client/lib/widgets/main/pr12video.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class PR12Video extends StatelessWidget {
const SizedBox(height: 10),
Text(
getKeywords(video.keywords),
style: const TextStyle(fontStyle: FontStyle.italic),
style: Theme.of(context).textTheme.subtitle2,
overflow: TextOverflow.ellipsis,
),
],
Expand Down Expand Up @@ -74,4 +74,4 @@ List<Widget> getCategoryWidgets(Category category) {
default:
return [const Icon(Icons.grid_view), const Text('ETC')];
}
}
}

0 comments on commit e53026b

Please sign in to comment.