fixed warnings (super.key, etc)
This commit is contained in:
@@ -4,7 +4,7 @@ import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
class PremiumPlanCard extends StatelessWidget {
|
||||
const PremiumPlanCard({
|
||||
Key? key,
|
||||
super.key,
|
||||
this.icon,
|
||||
this.title,
|
||||
this.description,
|
||||
@@ -12,7 +12,7 @@ class PremiumPlanCard extends StatelessWidget {
|
||||
this.url,
|
||||
this.gradient,
|
||||
this.active = false,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
final Widget? icon;
|
||||
final Widget? title;
|
||||
@@ -28,7 +28,8 @@ class PremiumPlanCard extends StatelessWidget {
|
||||
margin: EdgeInsets.zero,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20.0)),
|
||||
child: InkWell(
|
||||
customBorder: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20.0)),
|
||||
customBorder:
|
||||
RoundedRectangleBorder(borderRadius: BorderRadius.circular(20.0)),
|
||||
onTap: () {
|
||||
if (url != null) {
|
||||
launchUrl(
|
||||
@@ -51,13 +52,20 @@ class PremiumPlanCard extends StatelessWidget {
|
||||
children: [
|
||||
if (icon != null) ...[
|
||||
IconTheme(
|
||||
data: Theme.of(context).iconTheme.copyWith(size: 42.0),
|
||||
data: Theme.of(context)
|
||||
.iconTheme
|
||||
.copyWith(size: 42.0),
|
||||
child: icon!,
|
||||
),
|
||||
const SizedBox(height: 12.0),
|
||||
],
|
||||
DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.displaySmall!.copyWith(fontWeight: FontWeight.bold, fontSize: 25.0),
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.displaySmall!
|
||||
.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 25.0),
|
||||
child: title!,
|
||||
),
|
||||
],
|
||||
@@ -78,7 +86,8 @@ class PremiumPlanCard extends StatelessWidget {
|
||||
borderRadius: BorderRadius.circular(99.0),
|
||||
),
|
||||
margin: const EdgeInsets.all(4.0),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12.0),
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 12.0),
|
||||
child: const Text(
|
||||
"Aktív",
|
||||
style: TextStyle(
|
||||
@@ -95,10 +104,16 @@ class PremiumPlanCard extends StatelessWidget {
|
||||
TextSpan(text: "\$$price"),
|
||||
TextSpan(
|
||||
text: " / hó",
|
||||
style: TextStyle(color: Theme.of(context).textTheme.bodyMedium!.color!.withOpacity(.7)),
|
||||
style: TextStyle(
|
||||
color: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyMedium!
|
||||
.color!
|
||||
.withOpacity(.7)),
|
||||
),
|
||||
]),
|
||||
style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 24.0),
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold, fontSize: 24.0),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -108,13 +123,15 @@ class PremiumPlanCard extends StatelessWidget {
|
||||
children: [
|
||||
if (icon != null) ...[
|
||||
IconTheme(
|
||||
data: Theme.of(context).iconTheme.copyWith(size: 24.0, color: AppColors.of(context).text),
|
||||
data: Theme.of(context).iconTheme.copyWith(
|
||||
size: 24.0, color: AppColors.of(context).text),
|
||||
child: icon!,
|
||||
),
|
||||
],
|
||||
const SizedBox(width: 12.0),
|
||||
DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.displaySmall!.copyWith(fontWeight: FontWeight.bold, fontSize: 25.0),
|
||||
style: Theme.of(context).textTheme.displaySmall!.copyWith(
|
||||
fontWeight: FontWeight.bold, fontSize: 25.0),
|
||||
child: title!,
|
||||
),
|
||||
],
|
||||
@@ -123,10 +140,13 @@ class PremiumPlanCard extends StatelessWidget {
|
||||
const SizedBox(height: 6.0),
|
||||
if (description != null)
|
||||
DefaultTextStyle(
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyMedium!
|
||||
.copyWith(color: Theme.of(context).textTheme.bodyMedium!.color!.withOpacity(.8), fontSize: 18),
|
||||
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
||||
color: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyMedium!
|
||||
.color!
|
||||
.withOpacity(.8),
|
||||
fontSize: 18),
|
||||
child: description!,
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user