How To Enable Zoom Webview Using Flutter Android App

admin_img Posted By Bajarangi soft , Posted On 06-11-2020

We are going to use flutter webview community plugin. If you have done this using default flutter webview and consider sharing your code kindly use the comment below.You can copy and adopt this source code example to your android project without reinventing the wheel.

How To Enable Zoom Webview Using Flutter Android App

Enable Zoom Webview
Step 1:  We cannot directly remove the time stamp from Enable Zoom Webview but using the intl.dart package we can easily filter the date stamp from time stamp. So open your flutter project’s pubspec.yaml in code

dependencies:
  flutter:
    sdk: flutter
  flutter_webview_plugin: 0.3.0+2
 

Step 2: After done saving the pubspec.yaml file, Open your flutter project root folder in Command Prompt or Terminal and execute flutter pub get command. 

flutter pub get

Step 3: Open your project’s main.dart file and import material.dart and flutter_webview_plugin: 0.3.0+2.dart package.
import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';

Complete Code For Enable Zoom Webview  In Flutter
main.dart
import 'package:flutter/material.dart';
import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
          body: WebviewScaffold(
            url: 'https://bajarangisoft.com/',
            hidden: true,
            withZoom: true,
            appBar: AppBar(
              backgroundColor: Colors.lightGreen,
                title: Text("Zoom Webview")),
          ),),
    );
  }
}

Related Post