Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
[ad_1]
As I scroll up or down in flutter, the display screen begins to shake/stutter.
Right here is the video of what I’m speaking about (flutter run –release):
https://drive.google.com/file/d/1OdrmXNZAO78cOEjhGP6gd_mVKJ3Q_QIT/view?usp=sharing
I do not perceive what is going on? Additionally, on different screens, there may be jank/stuttering on ListView.builder:
I do not suppose the WebView is inflicting this drawback since I’ve tried making a separate display screen with solely a WebView, and it doesn’t lag and scrolls easily.
The code of the construct technique:
@override
Widget construct(BuildContext context) {
return Scaffold(
appBar: appBar,
backgroundColor: const Coloration.fromRGBO(242, 242, 242, 1),
physique: SingleChildScrollView(
little one: Column(
mainAxisSize: MainAxisSize.min,
kids: [
Container(
color: Colors.white,
height: MediaQuery.of(context).size.height * 0.3,
child: Stack(
children: [
SizedBox(
height: double.infinity,
width: double.infinity,
child: (imgUrl != '')
? CachedNetworkImage(
imageUrl: imgUrl,
fit: BoxFit.cover,
width: double.infinity,
fadeInDuration: const Duration(milliseconds: 150),
)
: RepaintBoundary(
child: Shimmer.fromColors(
baseColor: Colors.black38,
highlightColor: Colors.white,
child: Container(
color: Colors.black12,
),
),
),
),
],
),
),
Container(
shade: Colours.white,
little one: Column(
mainAxisAlignment: MainAxisAlignment.begin,
crossAxisAlignment: CrossAxisAlignment.begin,
kids: [
const SizedBox(height: 13),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 13),
child: (title != '')
? AutoSizeText(
title,
style: const TextStyle(
fontSize: 21.5,
fontWeight: FontWeight.w800,
color: Colors.black87,
letterSpacing: -0.5,
),
)
: PlaceholderText(
numberOfItems: 2,
height: 21.0,
),
),
const SizedBox(height: 13),
const Padding(
padding: EdgeInsets.symmetric(horizontal: 13),
child: const GrayLine(),
),
const SizedBox(height: 9),
(author != '')
? Padding(
padding: const EdgeInsets.symmetric(horizontal: 13),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
const Text(
'AUTOR: ',
style: TextStyle(
fontSize: 16,
color: Colors.black87,
fontWeight: FontWeight.w800,
),
),
Text(
author,
style: const TextStyle(
fontSize: 16,
color: Colors.black54,
fontWeight: FontWeight.w500,
),
),
],
),
)
: const SizedBox(),
(writer != '') ? const SizedBox(top: 4) : const SizedBox(),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 13),
little one: (date != '')
? Textual content(
date,
model: const TextStyle(
fontSize: 16,
shade: Colours.black54,
fontWeight: FontWeight.w600,
),
)
: PlaceholderText(
numberOfItems: 1,
top: 17.0,
endWidth: 200.0,
),
),
(articleUrl != '') ? const SizedBox(top: 7) : const SizedBox(),
(articleUrl != '')
? Padding(
padding: const EdgeInsets.symmetric(horizontal: 13),
little one: Row(
mainAxisSize: MainAxisSize.min,
kids: [
Text(
shares,
style: const TextStyle(
fontSize: 16,
color: Colors.black54,
),
),
const SizedBox(width: 3),
const Icon(
Icons.share,
size: 18,
color: Colors.black54,
),
const SizedBox(width: 7),
ShareIconsBar(articleUrl: articleUrl),
],
),
)
: const SizedBox(),
const SizedBox(top: 9),
const Padding(
padding: EdgeInsets.symmetric(horizontal: 13),
little one: const GrayLine(),
),
(introduction != '')
? SizedBox(
top: 15,
)
: SizedBox(),
(introduction != '')
? Padding(
padding: const EdgeInsets.symmetric(horizontal: 13.0),
little one: Textual content(
introduction,
model: TextStyle(
fontSize: 17.5,
fontWeight: FontWeight.w700,
letterSpacing: -0.5,
),
),
)
: const SizedBox(),
(_isAdLoaded) ? SizedBox(top: 13) : SizedBox(),
(_isAdLoaded) ? Heart(little one: bannerAdWidget()) : SizedBox(),
Stack(
kids: [
(isViewVisible)
? SizedBox(
height: contentHeight.toDouble(),
child: RepaintBoundary(
child: InAppWebView(
onConsoleMessage: (controller, consoleMessage) async {
},
initialOptions: InAppWebViewGroupOptions(
crossPlatform: InAppWebViewOptions(
supportZoom: false,
cacheEnabled: false,
useShouldOverrideUrlLoading: true,
mediaPlaybackRequiresUserGesture: false,
),
android: AndroidInAppWebViewOptions(
useHybridComposition: true,
),
// ios: IOSInAppWebViewOptions(
// suppressesIncrementalRendering: true,
// ),
),
onWebViewCreated: (InAppWebViewController controller) {
_webViewController = controller;
loadLocalHTML();
},
onLoadStart: (InAppWebViewController controller, url) {
print('Loading Started');
},
onLoadStop: (InAppWebViewController controller, url) async {
print('Loading Stopped');
_isLoaded = true;
},
onProgressChanged: (InAppWebViewController controller, int progress) {
print(progress);
},
),
),
)
: const SizedBox(),
(!_isLoaded)
? Container(
width: double.infinity,
height: 100,
color: Colors.white,
child: const Padding(
padding: const EdgeInsets.symmetric(horizontal: 13.0),
child: PlaceholderText(
numberOfItems: 4,
height: 17.0,
),
),
)
: const SizedBox()
],
)
],
),
),
(relatedArticlesFinal.isNotEmpty)
? (relatedArticlesFinal.size >= 2)
? IzdvojenoSection(
izdvojenoNews: relatedArticlesFinal,
title: 'vezani tekstovi',
)
: const SizedBox()
: const SizedBox(),
(categogryArticlesFinal.isNotEmpty)
? (categogryArticlesFinal.size >= 1)
? MoreFromCategory(information: categogryArticlesFinal)
: const SizedBox()
: const SizedBox(),
],
),
),
// ],
// ),
);
}
Widget bannerAdWidget() {
return RepaintBoundary(
little one: StatefulBuilder(
builder: (context, setState) => Container(
shade: Colours.white,
little one: AdWidget(advert: _bannerAd),
width: _bannerAd.dimension.width.toDouble(),
top: _bannerAd.dimension.width.toDouble(),
alignment: Alignment.heart,
),
),
);
}
Flutter model:
Flutter 2.12.0-4.2.pre • channel beta • https://github.com/flutter/flutter.git
Framework • revision 5c931b769b (2 weeks in the past) • 2022-03-29 10:49:29 -0500
Engine • revision 486f4a749e
Instruments • Dart 2.17.0 (construct 2.17.0-182.2.beta) • DevTools 2.11.
I’ve tried operating it on grasp department, however it’s even worse there!
Thank You!
[ad_2]