首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >哪些插件要取消检查,哪些插件要在android中签入以进行颤振开发。

哪些插件要取消检查,哪些插件要在android中签入以进行颤振开发。
EN

Stack Overflow用户
提问于 2019-09-16 12:54:09
回答 1查看 312关注 0票数 0

我已经决定取消一些插件,我认为它们是不必要的颤振开发,以使安卓工作室更轻。

PLease为颤振开发提供了有用和无用的插件列表.

顺便问一下,我想知道下面提到的插件是否有用?

1. kotlin插件对颤振有用吗?2. 2.Markdown支持插件3.2.Markdown导航插件4. 4.Gauge 5.Android APK支持6.APK link助手7.Android NDK支持8. 8.Covergae 9.EditorConfig 10. 10.Google云工具为android studio 12.118n提供支持java 13.Groovy 14.Intellij配置脚本15.Intelliang 16.java字节代码反编译器17.java流调试器18.JUnit 19.Kotlin 20.Mercurial‘21属性支持22.Settings 23 23.smali支持24.Sub版本25任务管理测试记录器27.TestNG-J

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-09-17 02:30:38

将html文件放入web服务器并以字符串形式加载这些html文件。

代码段

代码语言:javascript
运行
复制
_loadHtmlFromAssets() async {    
    String url = 'http://test.com/Android/sample.html';
    Response response = await get(url);
    // sample info available in response

    String fileText = response.body;

    _controller.loadUrl( Uri.dataFromString(
        fileText,
        mimeType: 'text/html',
        encoding: Encoding.getByName('utf-8')
    ).toString());
  }

全码

代码语言:javascript
运行
复制
import 'package:flutter/material.dart';
import 'dart:convert';

import 'package:flutter/services.dart';
import 'package:webview_flutter/webview_flutter.dart';
import 'package:http/http.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        // This is the theme of your application.
        //
        // Try running your application with "flutter run". You'll see the
        // application has a blue toolbar. Then, without quitting the app, try
        // changing the primarySwatch below to Colors.green and then invoke
        // "hot reload" (press "r" in the console where you ran "flutter run",
        // or simply save your changes to "hot reload" in a Flutter IDE).
        // Notice that the counter didn't reset back to zero; the application
        // is not restarted.
        primarySwatch: Colors.blue,
      ),
      home: HelpScreen(),
    );
  }
}

class HelpScreen extends StatefulWidget {
  @override
  HelpScreenState createState() {
    return HelpScreenState();
  }
}

class HelpScreenState extends State<HelpScreen> {
  WebViewController _controller;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('Help')),
      body: SingleChildScrollView(
        child: Column(
          children: <Widget>[
            Container(
              height: 300,
              child: WebView(
                initialUrl: '',
                javascriptMode: JavascriptMode.unrestricted,
                onWebViewCreated: (WebViewController webViewController) {
                  _controller = webViewController;
                },
              ),
            ),
            IconButton(
              icon: const Icon(
                Icons.thumb_up,
                semanticLabel: 'Thumbs up',
              ),
              onPressed: () {
                _loadHtmlFromAssets();
              },
            ),
          ],
        ),
      ),
    );
  }

  _loadHtmlFromAssets() async {
    //String fileText = await rootBundle.loadString('assets/help.html');
    String url = 'http://test.com/Android/sample.html';
    Response response = await get(url);
    // sample info available in response

    String fileText = response.body;

    _controller.loadUrl( Uri.dataFromString(
        fileText,
        mimeType: 'text/html',
        encoding: Encoding.getByName('utf-8')
    ).toString());
  }
}

演示

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57957348

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档