bug fixes + terms of use
This commit is contained in:
parent
ce804000de
commit
cd3d2d59b3
|
|
@ -5,6 +5,7 @@ import 'package:didvan/views/widgets/didvan/text_field.dart';
|
|||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
class UsernameInput extends StatefulWidget {
|
||||
const UsernameInput({
|
||||
|
|
@ -70,7 +71,7 @@ class _UsernameInputState extends State<UsernameInput> {
|
|||
.textTheme
|
||||
.caption!
|
||||
.copyWith(color: Theme.of(context).colorScheme.primary),
|
||||
recognizer: TapGestureRecognizer()..onTap = () {},
|
||||
recognizer: TapGestureRecognizer()..onTap = _openTermsOfUse,
|
||||
),
|
||||
const TextSpan(text: 'و\n'),
|
||||
TextSpan(
|
||||
|
|
@ -79,7 +80,7 @@ class _UsernameInputState extends State<UsernameInput> {
|
|||
.textTheme
|
||||
.caption!
|
||||
.copyWith(color: Theme.of(context).colorScheme.primary),
|
||||
recognizer: TapGestureRecognizer()..onTap = () {},
|
||||
recognizer: TapGestureRecognizer()..onTap = _openTermsOfUse,
|
||||
),
|
||||
const TextSpan(text: 'را میپذیرم'),
|
||||
],
|
||||
|
|
@ -92,4 +93,8 @@ class _UsernameInputState extends State<UsernameInput> {
|
|||
],
|
||||
);
|
||||
}
|
||||
|
||||
void _openTermsOfUse() {
|
||||
launch('https://didvan.app/termsOfUse.html');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,14 @@ class DidvanBNB extends StatelessWidget {
|
|||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
borderRadius: const BorderRadius.vertical(top: Radius.circular(16)),
|
||||
boxShadow: DesignConfig.defaultShadow,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
offset: const Offset(0, -18),
|
||||
color: const Color(0XFF1B3C59).withOpacity(0.25),
|
||||
blurRadius: 40,
|
||||
spreadRadius: -15,
|
||||
),
|
||||
],
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
child: Row(
|
||||
|
|
|
|||
|
|
@ -209,14 +209,14 @@ class _DidvanPageViewState extends State<DidvanPageView> {
|
|||
child: Center(
|
||||
child: SkeletonImage(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: 200,
|
||||
imageUrl: content.image,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const Positioned(
|
||||
right: 16,
|
||||
right: 24,
|
||||
top: 24,
|
||||
child: _BackButton(),
|
||||
),
|
||||
],
|
||||
|
|
@ -225,7 +225,7 @@ class _DidvanPageViewState extends State<DidvanPageView> {
|
|||
},
|
||||
child: SkeletonImage(
|
||||
imageUrl: content.image!,
|
||||
aspectRatio: 16 / 9,
|
||||
width: double.infinity,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,17 +8,17 @@ import 'package:cached_network_image_platform_interface/cached_network_image_pla
|
|||
|
||||
class SkeletonImage extends StatelessWidget {
|
||||
final String imageUrl;
|
||||
final double width;
|
||||
final double height;
|
||||
final double? width;
|
||||
final double? height;
|
||||
final BorderRadius? borderRadius;
|
||||
final double? aspectRatio;
|
||||
const SkeletonImage({
|
||||
Key? key,
|
||||
required this.imageUrl,
|
||||
this.width = 300,
|
||||
this.height = 140,
|
||||
this.borderRadius = DesignConfig.lowBorderRadius,
|
||||
this.aspectRatio,
|
||||
this.width,
|
||||
this.height,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
|
|
@ -30,15 +30,13 @@ class SkeletonImage extends StatelessWidget {
|
|||
width: width,
|
||||
height: height,
|
||||
imageUrl: RequestHelper.baseUrl + imageUrl,
|
||||
imageBuilder: (context, imageProvider) => Container(
|
||||
decoration: BoxDecoration(
|
||||
imageBuilder: (context, imageProvider) => ClipRRect(
|
||||
borderRadius: borderRadius ?? DesignConfig.lowBorderRadius,
|
||||
image: DecorationImage(
|
||||
child: Image(
|
||||
image: imageProvider,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
progressIndicatorBuilder: (context, url, progress) =>
|
||||
ShimmerPlaceholder(
|
||||
borderRadius: borderRadius,
|
||||
|
|
|
|||
Loading…
Reference in New Issue