我是 Flutter 的新手,目前,我正在制作一个非常简单的应用程序,它只是一个 WebView。我的问题是如何将此代码插入到我的 Flutter WebView 中?
footer#footer, div#st_notification_1, #sidebar_box {
display: none!important;
}
Run Code Online (Sandbox Code Playgroud)
目前,我正在尝试在我的应用程序选项卡之一上使用 Flutter 团队的 WebView 插件。我正在尝试加载和隐藏页脚的网站是:
下面是我试图隐藏页脚的那个选项卡 Webview 的代码
更新:修复它。下面的代码对我
有用 注意:我还重新检查了网站并将其更改getElementsById为getElementsByClassName与上面网站上页脚的类名相对应。
注2:Flutter 包中有很多 WebView 应用程序,我使用的是 Flutter 团队的 Flutter Webview。
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';
import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';
class ProfileAccount extends StatefulWidget {
ProfileAccount({Key key}) : super(key: key);
@override
_ProfileAccountState createState() => _ProfileAccountState();
}
class _ProfileAccountState extends State<ProfileAccount> {
WebViewController _myController;
final Completer<WebViewController> _controller =
Completer<WebViewController>();
@override
Widget build(BuildContext context) {
return …Run Code Online (Sandbox Code Playgroud) 你好,我知道 Flutter 仍然不支持 SVG 文件,所以我使用了 flutter_svg 包,但由于某种原因,svg 文件没有渲染我想要使用的 SVG 文件。
我想要的是使用我的自定义 SVG 文件作为底部导航栏项目中的图标。
我想使用 SVG 图标,以便我可以在它们处于非活动或活动(选定)状态时轻松更改它们的颜色
我这样称呼它:
BottomNavigationBarItem(
icon: SvgPicture.asset("assets/svg_home.svg"),
title: Text("Home"),
activeIcon: Icon(Icons.category, color: Color(0xFFEF5123)),
),
Run Code Online (Sandbox Code Playgroud) 我正在准备在 Playstore 中发布我的 flutter 应用程序,但它给了我这个错误:
错误:
* Where:
Build file 'C:\Users\svesp\Desktop\Vlad Esplana\syncshop_webview\android\app\build.gradle' line: 60
* What went wrong:
A problem occurred evaluating project ':app'.
> path may not be null or empty string. path='null'
Run Code Online (Sandbox Code Playgroud)
我的key.properties:
storePassword=hidden
keyPassword=hidden
keyAlias=random
storeFile=C:/Users/svesp/key.jks
Run Code Online (Sandbox Code Playgroud)
我的应用程序级别build.gradle
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with …Run Code Online (Sandbox Code Playgroud) 正如您在附加的视频中可以看到的那样,滚动时存在问题。它应该像一个无限滚动视图(就像在 facebook 的应用程序新闻提要上一样)
问题是父 ListView 中似乎有一个“嵌套”滚动。我怎样才能解决这个问题?请协助
视频在这里(我不知道如何在此处附加视频,因此我将其放在 youtube 上)
我的主页代码是这样的,“更多优惠”部分应该像 Facebook 的新闻提要一样从 Firebase 后端连续生成数据:
@override
Widget build(BuildContext context) {
width = MediaQuery.of(context).size.width;
return SafeArea(
child: Scaffold(
backgroundColor: Color(0xFF0d192a),
appBar: CustomAppBar(height: 60),
// appBar: CustomAppBar(height: 70),
drawer: DrawerNiVlad(),
body: ListView(
//vlad
children: <Widget>[
// some widgets here
ArlTitleText('More Offers'),
MoreOffers(), <= The widget that has a "nested scroll"
sb5,
Run Code Online (Sandbox Code Playgroud)
MoreOffers 小部件代码
Widget build(BuildContext context) {
return StreamBuilder(
initialData: List<DiscountEntity>(),
stream: _moreOffersBloc.listDiscounts3Flux,
builder: (BuildContext context, AsyncSnapshot snapshot) {
if (!snapshot.hasData) return Container(height: …Run Code Online (Sandbox Code Playgroud)