4
  1. URL_ LAUNCHER opens URL on a web browser

  2. But I want to show URL inside my app INSTEAD OF any browser

  3. How can I achieve this ?

  4. Whenever user click on a button url should launch inside my app instead of any default web browser or any type of browser

1
  • Use webview plugin. Commented Oct 11, 2019 at 5:31

4 Answers 4

4

You can use this Flutter plugin https://pub.dartlang.org/packages/webview_flutter

import 'package:webview_flutter/webview_flutter.dart';

    return Scaffold(
          appBar: AppBar(
            title: const Text('WebView example'),
          ),
          body: const WebView(
            initialUrl: 'SOME URL',
            javascriptMode: JavascriptMode.unrestricted,
          ),
        );
Sign up to request clarification or add additional context in comments.

1 Comment

Thank you for this answer ...Is this plugin going to display linear/horizontal progress bar status in the app bar section?
0

You can use this library to launch urls inside of your app on Android (this is the default behavior for url_launcher on iOS

1 Comment

Thank you for this plugin... I was searching for this pugin to make my job easier.
0

You can use webview_flutter plugin to achieve that.

Simple example:

WebView( 
  initialUrl: 'https://www.google.com',
)

To answer your second question:

Is this plugin going to display linear/horizontal progress bar status in the app bar section?

The WebView is just like any other flutter widget so yes, you can show linear/horizontal progress bar in your AppBar they way you have planned it.

Comments

0

You can use launchUrlString() method,

launchUrlString(url,
   mode: LaunchMode.inAppWebView
);

it provide different mode:

  • LaunchMode.platformDefault

  • LaunchMode.inAppWebView

  • LaunchMode.inAppBrowserView

  • LaunchMode.externalApplication

  • LaunchMode.externalNonBrowserApplication

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.