Skip to content

Commit

Permalink
fix: hotfix some flutter change
Browse files Browse the repository at this point in the history
- Change the color to onPrimary for issue report modal button
- Add subject to share_plus content because subject is only added for email.
- Replace font with GoogleFonts.
  • Loading branch information
kkweon committed Jun 27, 2021
1 parent 576721b commit 7687a6b
Show file tree
Hide file tree
Showing 9 changed files with 97 additions and 22 deletions.
Binary file removed client/fonts/DancingScript-Medium.ttf
Binary file not shown.
Binary file removed client/fonts/DancingScript-Regular.ttf
Binary file not shown.
Binary file removed client/fonts/PermanentMarker-Regular.ttf
Binary file not shown.
6 changes: 5 additions & 1 deletion client/lib/custom_theme.dart
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:google_fonts/google_fonts.dart';

/// _kHeadline1 는 Abstract/Recommendations/Repositories 등을 나타내는 헤딩1.
const _kHeadline1 = TextStyle(fontFamily: 'PermanentMarker', fontSize: 25);
final _kHeadline1 = GoogleFonts.permanentMarker(fontSize: 25);

/// CustomTheme 은 전체 테마를 정의합니다.
///
/// # 사용법
///
/// ```dart
/// Consumer<CustomTheme>(builder: (context, theme, _child) { ... }
/// // or
/// context.read<CustomTheme>();
/// ```
class CustomTheme extends ChangeNotifier {
static ThemeData get lightTheme {
Expand All @@ -27,6 +30,7 @@ class CustomTheme extends ChangeNotifier {
}

bool _isDarkMode = false;

bool get isDarkMode {
return _isDarkMode;
}
Expand Down
2 changes: 1 addition & 1 deletion client/lib/screens/detail_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class DetailScreen extends StatelessWidget {
floatingActionButton: FloatingActionButton(
onPressed: () {
final String subject = "[PR-12 공유] ${args.video.title}";
Share.share(generateShareSummary(args.video, detail),
Share.share("$subject\n\n${generateShareSummary(args.video, detail)}",
subject: subject);
},
child: const Icon(Icons.share),
Expand Down
5 changes: 4 additions & 1 deletion client/lib/widgets/detail/youtube_native.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import 'package:youtube_player_flutter/youtube_player_flutter.dart';
class YoutubeWidget extends StatefulWidget {
final String youtubeId;

const YoutubeWidget({Key? key, required this.youtubeId}) : super(key: key);
const YoutubeWidget({
Key? key,
required this.youtubeId,
}) : super(key: key);

@override
_YouTubeWidgetState createState() => _YouTubeWidgetState();
Expand Down
20 changes: 12 additions & 8 deletions client/lib/widgets/main/report.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ class _ReportWidgetState extends State<ReportWidget> {
Icon(Icons.report, size: 30, color: Theme.of(context).accentColor),
),
Divider(
indent: 10,
endIndent: 10,
height: 15,
indent: 20,
endIndent: 20,
thickness: 2,
color: Theme.of(context).accentColor,
),
Container(
Expand All @@ -47,7 +47,6 @@ class _ReportWidgetState extends State<ReportWidget> {
},
underline: Container(
height: 2,
color: Theme.of(context).accentColor,
),
style: Theme.of(context).textTheme.headline6,
items: reportPreset.map<DropdownMenuItem<String>>((String value) {
Expand Down Expand Up @@ -84,12 +83,17 @@ class _ReportWidgetState extends State<ReportWidget> {
onPressed: () {
// send report action
},
icon: Icon(Icons.outbox,
size: 30, color: Theme.of(context).primaryIconTheme.color),
icon: const Icon(
Icons.outbox,
size: 30,
),
label: Container(
padding: const EdgeInsets.only(top: 15, bottom: 15),
child:
Text('제보 보내기', style: Theme.of(context).textTheme.headline6),
child: Text('제보 보내기',
style: Theme.of(context)
.textTheme
.headline6!
.apply(color: Theme.of(context).colorScheme.onPrimary)),
),
))
]),
Expand Down
65 changes: 64 additions & 1 deletion client/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
ffi:
dependency: transitive
description:
name: ffi
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.2"
file:
dependency: transitive
description:
Expand Down Expand Up @@ -257,6 +264,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
google_fonts:
dependency: "direct main"
description:
name: google_fonts
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
googleapis_auth:
dependency: transitive
description:
Expand Down Expand Up @@ -411,6 +425,41 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
path_provider:
dependency: transitive
description:
name: path_provider
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2"
path_provider_linux:
dependency: transitive
description:
name: path_provider_linux
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
path_provider_macos:
dependency: transitive
description:
name: path_provider_macos
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
pedantic:
dependency: transitive
description:
Expand Down Expand Up @@ -738,6 +787,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
win32:
dependency: transitive
description:
name: win32
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.4"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0"
yaml:
dependency: transitive
description:
Expand All @@ -760,5 +823,5 @@ packages:
source: hosted
version: "2.0.0"
sdks:
dart: ">=2.12.0 <3.0.0"
dart: ">=2.13.0 <3.0.0"
flutter: ">=2.0.0"
21 changes: 11 additions & 10 deletions client/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ dependencies:
flutter:
sdk: flutter
flutter_inappwebview: ^5.3.2
google_fonts: ^2.1.0
grpc: ^3.0.0
intl: ^0.17.0
modal_bottom_sheet: ^2.0.0
intl: ^0.17.0
modal_bottom_sheet: ^2.0.0
protobuf: ^2.0.0
provider: ^5.0.0
share_plus: ^2.1.4
Expand Down Expand Up @@ -73,11 +74,11 @@ flutter:
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
fonts:
- family: DancingScript
fonts:
- asset: fonts/DancingScript-Regular.ttf
- asset: fonts/DancingScript-Medium.ttf
- family: PermanentMarker
fonts:
- asset: fonts/PermanentMarker-Regular.ttf
# fonts:
# - family: DancingScript
# fonts:
# - asset: fonts/DancingScript-Regular.ttf
# - asset: fonts/DancingScript-Medium.ttf
# - family: PermanentMarker
# fonts:
# - asset: fonts/PermanentMarker-Regular.ttf

0 comments on commit 7687a6b

Please sign in to comment.