Giter Site home page Giter Site logo

efortuna / wiki_browser Goto Github PK

View Code? Open in Web Editor NEW
123.0 5.0 93.0 54 KB

A little Flutter app that demonstrates WebViews and while also allowing you to browse and bookmark your favorite wikipedia pages.

Java 3.68% Ruby 22.08% Objective-C 7.53% Dart 66.71%

wiki_browser's Introduction

wiki_browser's People

Contributors

efortuna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

wiki_browser's Issues

Unable to open pdf link in webview

@efortuna I am using this plugin webview_flutter to open a pdf link which works properly on iOS, but on Android, I am getting below error:

No DRP key due to exception:java.lang.ClassNotFoundException: com.android.webview.chromium.Drp

I am using Android emulator (Nexus 6P, OS: Marshmallow).

If I understand correctly, above error is related to runtime permissions being required on Android for api > = 23.
Would you know how to give required permissions to address this issue ? Or any workaround that'll help to open pdf using this plugin ?

This is how I am using the webview plugin as a sample:


class _MyHomePageState extends State<MyHomePage> {

  Completer<WebViewController> _controller = Completer<WebViewController>();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
          title: Text('WebView Demo')
      ),
      body: WebView(
        initialUrl: 'http://unec.edu.az/application/uploads/2014/12/pdf-sample.pdf',
        javascriptMode: JavascriptMode.unrestricted,
        onWebViewCreated: (WebViewController webViewController) {
          _controller.complete(webViewController);
        },
      ),
    );
  }
}

Flutter doctor:


[✓] Flutter (Channel beta, v0.11.10, on Mac OS X 10.13.6 17G65, locale en-US)
    • Flutter version 0.11.10 at
      /Users/deeptibelsare/Documents/DarshanUdacity/Flutter/flutter
    • Framework revision c27c4a265e (3 months ago), 2018-11-26 17:07:24 -0500
    • Engine revision eebc6a5895
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[!] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at /Users/deeptibelsare/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling
      support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_152-release-1024-b01)
    ✗ Android license status unknown.

[!] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 9.4.1, Build version 9F2000
    ✗ Verify that all connected devices have been paired with this computer in
      Xcode.
      If all devices have been paired, libimobiledevice and ideviceinstaller may
      require updating.
      To update with Brew, run:
        brew update
        brew uninstall --ignore-dependencies libimobiledevice
        brew uninstall --ignore-dependencies usbmuxd
        brew install --HEAD usbmuxd
        brew unlink usbmuxd
        brew link usbmuxd
        brew install --HEAD libimobiledevice
        brew install ideviceinstaller
    • ios-deploy 2.0.0
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 26.0.1
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build
      1.8.0_152-release-1024-b01)

[✓] Connected device (2 available)
    • Android SDK built for x86 • emulator-5554                        •
      android-x86 • Android 6.0 (API 23) (emulator)
    • iPhone 8                  • FB2DF839-2E8D-44E0-90B8-CCA0F138C932 • ios
      • iOS 11.4 (simulator)

! Doctor found issues in 2 categories.

How to give the initial url dynamically ?

Am getting error Invalid constant value ?? am new to Flutter

`import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';
import './Model/Model.dart';

class WebViewScreen extends StatelessWidget{

final WebData data;

WebViewScreen({this.data});
@OverRide
Widget build(BuildContext context) {
return new Scaffold(
appBar: AppBar(
backgroundColor: Colors.orange,
title: Text(data.navigationName),
),
body:new Container(
color: Colors.blueAccent,
child: const WebView(
// here am getting error invalid constant value
initialUrl:data.url,
javascriptMode: JavascriptMode.unrestricted,
),
)
,
);
}

}
`

the app does not allow text input

using wikipedia and other websites the app does not allow to type input text on search bars using the android version
i tried enabling javascriptmode to unrestricted mode and still the same

How to handle navigation webview for Android

Hi,
The example is working great.

For Android, there's device navigate button, if I click on that back button, it go back to previous screen not navigate in the webview.

What is the recommendation for handling this ?
Thanks

Asking for another browser

When I was using webview in my flutter code it is show some error in webview library java file, so I've cloned this app to test but this app crashes unexpectedly and asking for other browsers to open the link.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.