forked from firka/firka
add new padding
This commit is contained in:
@@ -190,87 +190,70 @@ class _LoginWebviewWidgetState extends FirkaState<LoginWebviewWidget>
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final mediaQuery = MediaQuery.of(context);
|
||||||
|
final safePadding = mediaQuery.padding;
|
||||||
|
|
||||||
return Material(
|
return Material(
|
||||||
color: appStyle.colors.card,
|
color: appStyle.colors.card,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
bottom: MediaQuery.of(context).viewInsets.bottom,
|
top: 61 + safePadding.top,
|
||||||
|
left: 12,
|
||||||
|
right: 12,
|
||||||
|
bottom: 0 + safePadding.bottom,
|
||||||
),
|
),
|
||||||
child: FractionallySizedBox(
|
child: Column(
|
||||||
heightFactor: 0.90,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
child: Center(
|
children: [
|
||||||
child: Column(
|
Text(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
widget.data.l10n.runningInDomainBrowser,
|
||||||
mainAxisSize: MainAxisSize.max,
|
style: appStyle.fonts.H_12px.copyWith(
|
||||||
children: <Widget>[
|
color: appStyle.colors.textSecondary,
|
||||||
Column(
|
),
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
),
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
const SizedBox(height: 8),
|
||||||
|
Expanded(
|
||||||
|
child: ClipRRect(
|
||||||
|
borderRadius: BorderRadius.circular(20),
|
||||||
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
WebViewWidget(controller: _webViewController),
|
||||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
if (_fadeAnimationController != null &&
|
||||||
child: Container(
|
_fadeAnimation != null)
|
||||||
decoration: BoxDecoration(
|
IgnorePointer(
|
||||||
color: appStyle.colors.secondary.withValues(
|
ignoring: !_isLoading,
|
||||||
alpha: 0.5,
|
child: AnimatedBuilder(
|
||||||
),
|
animation: _fadeAnimationController!,
|
||||||
borderRadius: BorderRadius.all(Radius.circular(2)),
|
builder: (context, child) => AnimatedOpacity(
|
||||||
),
|
opacity: _isLoading
|
||||||
width: 40,
|
? 1.0
|
||||||
height: 4,
|
: _fadeAnimationController!.isAnimating
|
||||||
),
|
? _fadeAnimation!.value
|
||||||
),
|
: 0.0,
|
||||||
],
|
duration: const Duration(milliseconds: 500),
|
||||||
),
|
child: Container(
|
||||||
Container(
|
color: appStyle.colors.background,
|
||||||
height: MediaQuery.of(context).size.height * 0.8,
|
child: Center(
|
||||||
// Adjust height for content
|
child: SizedBox(
|
||||||
margin: const EdgeInsets.symmetric(horizontal: 16),
|
width: 32,
|
||||||
// Add ClipRRect for circular edges
|
height: 32,
|
||||||
child: ClipRRect(
|
child: CircularProgressIndicator(
|
||||||
borderRadius: BorderRadius.circular(20),
|
strokeWidth: 3,
|
||||||
child: Stack(
|
valueColor: AlwaysStoppedAnimation<Color>(
|
||||||
children: [
|
appStyle.colors.accent,
|
||||||
WebViewWidget(controller: _webViewController),
|
|
||||||
if (_fadeAnimationController != null &&
|
|
||||||
_fadeAnimation != null)
|
|
||||||
IgnorePointer(
|
|
||||||
ignoring: !_isLoading,
|
|
||||||
child: AnimatedBuilder(
|
|
||||||
animation: _fadeAnimationController!,
|
|
||||||
builder: (context, child) => AnimatedOpacity(
|
|
||||||
opacity: _isLoading
|
|
||||||
? 1.0
|
|
||||||
: _fadeAnimationController!.isAnimating
|
|
||||||
? _fadeAnimation!.value
|
|
||||||
: 0.0,
|
|
||||||
duration: const Duration(milliseconds: 500),
|
|
||||||
child: Container(
|
|
||||||
color: appStyle.colors.background,
|
|
||||||
child: Center(
|
|
||||||
child: SizedBox(
|
|
||||||
width: 32,
|
|
||||||
height: 32,
|
|
||||||
child: CircularProgressIndicator(
|
|
||||||
strokeWidth: 3,
|
|
||||||
valueColor:
|
|
||||||
AlwaysStoppedAnimation<Color>(
|
|
||||||
appStyle.colors.accent,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user