Skip to content

Commit

Permalink
change style
Browse files Browse the repository at this point in the history
  • Loading branch information
kidozh committed Dec 2, 2024
1 parent 384c402 commit 1fbbc08
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 37 deletions.
75 changes: 40 additions & 35 deletions lib/page/ChooseAdExemptPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -125,48 +125,53 @@ class _ChooseAdExemptState extends State<ChooseAdExemptPage> {
trailing: Icon(AppPlatformIcons(context)
.advertisementExemptCheckSolid),
onPressed: (context) {
showPlatformModalSheet(context: context, builder: (context) => Container(
color: Theme.of(context).dialogBackgroundColor,
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 32),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Icon(AppPlatformIcons(context).checkCircleOutlined, size: 32,),
SizedBox(height: 16, width: double.infinity,),
Text(S.of(context).discuzInAdExemptBuiltInList(discuz.siteName), style: TextStyle(
fontWeight: FontWeight.bold,
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: Theme.of(context).textTheme.bodyMedium?.fontSize
)),
SizedBox(height: 16, width: double.infinity,),
SizedBox(
width: double.infinity,
child: PlatformElevatedButton(
child: Text(discuz.siteName),
onPressed: (){
VibrationUtils.vibrateWithClickIfPossible();
URLUtils.launchURL(discuz.baseURL);
},
),
)
],
),
)
));
VibrationUtils.vibrateWithClickIfPossible();
launchAdExemptDialog(discuz);
}))
.toList()),
],
),
);
}

void launchAdExemptDialog(Discuz discuz){
showPlatformModalSheet(context: context, builder: (context) => Container(
color: Theme.of(context).dialogBackgroundColor,
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 32),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Icon(AppPlatformIcons(context).checkCircleOutlined, size: 32,),
SizedBox(height: 16, width: double.infinity,),
Text(S.of(context).discuzInAdExemptBuiltInList(discuz.siteName), style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18
)
),
SizedBox(height: 8, width: double.infinity,),
Text(S.of(context).discuzInAdExemptBuiltInListDescription(discuz.siteName), style: TextStyle(
fontWeight: FontWeight.normal,
fontSize: 14
)),
SizedBox(height: 16, width: double.infinity,),
SizedBox(
width: double.infinity,
child: PlatformElevatedButton(
child: Text(discuz.siteName),
onPressed: (){
VibrationUtils.vibrateWithClickIfPossible();
URLUtils.launchURL(discuz.baseURL);
},
),
)
],
),
)
));
}

Widget trailingWidget(String platformName) {
return (_selectedPlatformName == platformName)
? Icon(PlatformIcons(context).checkMark,
Expand Down
5 changes: 4 additions & 1 deletion lib/utility/URLUtils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,10 @@ class URLUtils{
mainAxisSize: MainAxisSize.min,
children:[
Container(
color: Colors.red.shade50,
decoration: BoxDecoration(
color: Colors.red.shade50,
borderRadius: BorderRadius.circular(8.0)
),
padding: EdgeInsets.symmetric(vertical: 4.0,horizontal: 4.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
Expand Down
2 changes: 1 addition & 1 deletion lib/widget/SteamGameWidget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ class SteamGameState extends State<SteamGameWidget> {
)),
WidgetSpan(
child: SizedBox(
width: 8.0,
width: 12,
)),
TextSpan(
text: S.of(context).openGameInSteam,
Expand Down

0 comments on commit 1fbbc08

Please sign in to comment.