Skip to content

Commit

Permalink
remove dependency from flutter_html
Browse files Browse the repository at this point in the history
  • Loading branch information
kidozh committed Nov 26, 2024
1 parent 79507be commit 21c9e83
Show file tree
Hide file tree
Showing 8 changed files with 160 additions and 355 deletions.
7 changes: 3 additions & 4 deletions lib/page/AddDiscuzPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import 'package:firebase_analytics/firebase_analytics.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_platform_widgets/flutter_platform_widgets.dart';
import 'package:form_validator/form_validator.dart';
import 'package:provider/provider.dart';
Expand Down Expand Up @@ -341,14 +340,14 @@ class _AddDiscuzFormFieldState
child: Icon(
Icons.verified,
color: Colors.green,
size: FontSize.medium.value * 1.2,
size: 16,
),
)),
TextSpan(
text:S.of(context).addDiscuzSuggestionVerifiedDiscuz,
style: TextStyle(
fontWeight: FontWeight.normal,
fontSize: FontSize.medium.value,
fontSize: 16,
)
),
]),
Expand Down Expand Up @@ -556,7 +555,7 @@ class _AddDiscuzFormFieldState
.colorScheme
.onPrimaryContainer,
fontWeight: FontWeight.normal,
fontSize: FontSize.medium.value,
fontSize: Theme.of(context).textTheme.bodyMedium?.fontSize,
)),
leading: Icon(PlatformIcons(context).info,
color:
Expand Down
7 changes: 3 additions & 4 deletions lib/page/ChooseAdExemptPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import 'package:discuz_flutter/utility/URLUtils.dart';
import 'package:discuz_flutter/utility/UserPreferencesUtils.dart';
import 'package:discuz_flutter/utility/VibrationUtils.dart';
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_platform_widgets/flutter_platform_widgets.dart';
import 'package:provider/provider.dart';
import 'package:settings_ui/settings_ui.dart';
Expand Down Expand Up @@ -83,7 +82,7 @@ class _ChooseAdExemptState extends State<ChooseAdExemptPage> {
child: Text(
S.of(context).adExemptNoNeedToConfirm,
style: TextStyle(
fontSize: FontSize.large.value,
fontSize: Theme.of(context).textTheme.bodyLarge?.fontSize,
color: Theme.of(context).disabledColor,
),
),
Expand Down Expand Up @@ -138,13 +137,13 @@ class _ChooseAdExemptState extends State<ChooseAdExemptPage> {
SizedBox(height: 16, width: double.infinity,),
Text(S.of(context).discuzInAdExemptBuiltInList(discuz.siteName), style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: FontSize.large.value
fontSize: Theme.of(context).textTheme.bodyLarge?.fontSize
)
),
SizedBox(height: 8, width: double.infinity,),
Text(S.of(context).discuzInAdExemptBuiltInListDescription(discuz.siteName), style: TextStyle(
fontWeight: FontWeight.normal,
fontSize: FontSize.medium.value
fontSize: Theme.of(context).textTheme.bodyMedium?.fontSize
)),
SizedBox(height: 16, width: double.infinity,),
SizedBox(
Expand Down
3 changes: 1 addition & 2 deletions lib/page/SelectSignatureStylePage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import 'dart:developer';
import 'package:discuz_flutter/utility/PostTextFieldUtils.dart';
import 'package:discuz_flutter/utility/VibrationUtils.dart';
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_platform_widgets/flutter_platform_widgets.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:provider/provider.dart';
Expand Down Expand Up @@ -155,7 +154,7 @@ class SelectSignatureStyleState extends State<SelectSignatureStylePage>{
children: [
Text(S.of(context).signaturePreview, style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: FontSize.xLarge.value
fontSize: Theme.of(context).textTheme.headlineMedium?.fontSize
)),
SizedBox(height: 8,),
Container(
Expand Down
3 changes: 1 addition & 2 deletions lib/screen/ExtraFuncInThreadScreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import 'package:discuz_flutter/utility/NetworkUtils.dart';
import 'package:discuz_flutter/utility/VibrationUtils.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_image_compress/flutter_image_compress.dart';
import 'package:flutter_platform_widgets/flutter_platform_widgets.dart';
import 'package:image_picker/image_picker.dart';
Expand Down Expand Up @@ -150,7 +149,7 @@ class ExtraFuncInThreadState extends State<ExtraFuncInThreadScreen>{
child: Text(S.of(context).attachmentUploadExceedingSizeDescription,
style: TextStyle(
color: Theme.of(context).colorScheme.onPrimary,
fontSize: FontSize.medium.value
fontSize: Theme.of(context).textTheme.bodyMedium?.fontSize
),
),
),
Expand Down
Loading

0 comments on commit 21c9e83

Please sign in to comment.