Flutter : News App Workshop #part4 open webviewpage

NewsPage.dart

InkWell (
    onTap: () {
      print('tap');
    },
)

Create WebViewPage.dart

import 'package:flutter/material.dart';

class WebViewPage extends StatefulWidget {
  const WebViewPage({Key? key}) : super(key: key);

  @override
  _WebViewPageState createState() => _WebViewPageState();
}

class _WebViewPageState extends State<WebViewPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('WebView'),
      ),
    );
  }
}

NewsPage.dart

Navigator.push(context, MaterialPageRoute(builder: (context) => WebViewPage()));

(Visited 20 times, 2 visits today)
Spread the love
Published
Categorized as Flutter