forked from firka/firka
Adjust webview loading fade timing
This commit is contained in:
@@ -42,7 +42,7 @@ class _DomainBrowserWebviewWidgetState
|
||||
super.initState();
|
||||
|
||||
_fadeAnimationController = AnimationController(
|
||||
duration: const Duration(milliseconds: 200),
|
||||
duration: const Duration(milliseconds: 300),
|
||||
vsync: this,
|
||||
);
|
||||
|
||||
@@ -60,7 +60,7 @@ class _DomainBrowserWebviewWidgetState
|
||||
..setNavigationDelegate(
|
||||
NavigationDelegate(
|
||||
onPageFinished: (String url) {
|
||||
Timer(const Duration(milliseconds: 300), () {
|
||||
Timer(Duration.zero, () {
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
@@ -188,7 +188,7 @@ class _DomainBrowserWebviewWidgetState
|
||||
: _fadeAnimationController!.isAnimating
|
||||
? _fadeAnimation!.value
|
||||
: 0.0,
|
||||
duration: const Duration(milliseconds: 500),
|
||||
duration: const Duration(milliseconds: 300),
|
||||
child: Container(
|
||||
color: appStyle.colors.background,
|
||||
child: Center(
|
||||
|
||||
@@ -51,7 +51,7 @@ class _LoginWebviewWidgetState extends FirkaState<LoginWebviewWidget>
|
||||
super.initState();
|
||||
|
||||
_fadeAnimationController = AnimationController(
|
||||
duration: const Duration(milliseconds: 200),
|
||||
duration: const Duration(milliseconds: 300),
|
||||
vsync: this,
|
||||
);
|
||||
|
||||
@@ -82,7 +82,7 @@ class _LoginWebviewWidgetState extends FirkaState<LoginWebviewWidget>
|
||||
..setNavigationDelegate(
|
||||
NavigationDelegate(
|
||||
onPageFinished: (String url) {
|
||||
Timer(const Duration(milliseconds: 500), () {
|
||||
Timer(Duration.zero, () {
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
@@ -286,9 +286,9 @@ class _LoginWebviewWidgetState extends FirkaState<LoginWebviewWidget>
|
||||
opacity: _isLoading
|
||||
? 1.0
|
||||
: _fadeAnimationController!.isAnimating
|
||||
? _fadeAnimation!.value
|
||||
: 0.0,
|
||||
duration: const Duration(milliseconds: 500),
|
||||
? _fadeAnimation!.value
|
||||
: 0.0,
|
||||
duration: const Duration(milliseconds: 300),
|
||||
child: Container(
|
||||
color: appStyle.colors.background,
|
||||
child: Center(
|
||||
@@ -386,7 +386,7 @@ class _LoginWebviewWidgetState extends FirkaState<LoginWebviewWidget>
|
||||
child: Center(
|
||||
child: Majesticon(
|
||||
Majesticon.chevronLeftLine,
|
||||
color: appStyle.colors.secondary,
|
||||
color: appStyle.colors.buttonDisabledIcon,
|
||||
size: 22,
|
||||
),
|
||||
),
|
||||
@@ -409,7 +409,7 @@ class _LoginWebviewWidgetState extends FirkaState<LoginWebviewWidget>
|
||||
child: Center(
|
||||
child: Majesticon(
|
||||
Majesticon.menuLine,
|
||||
color: appStyle.colors.secondary,
|
||||
color: appStyle.colors.buttonDisabledIcon,
|
||||
size: 22,
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user