Skip to main content

Command Palette

Search for a command to run...

How I Convert My HashNode Blog In-App Using 15 Lines Of Code

Updated
1 min read
A

Somethings about me JAVA for DS JAVASCRIPT FOR CREATIVITY HASHNODE For Blogs Node Js Because i love how things works behind the scene And love you because you visit me

I convert my Hashnode blog into an App by using flutter only using few Lines of Code.

Here I am using a flutter package flutter_webview_plugin: ^0.4.0

Install this package in your pubspec file

Now here is a code,
you have to pass your blog URL in URL section.

import 'package:flutter/material.dart';
import 'package:flutter_webview_plugin/flutter_webview_plugin.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(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(),
    );
  }
}

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

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

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return WebviewScaffold(url: 'https://hashnode.com/@amandev',);
  }
}

WhatsApp Image 2021-08-04 at 5.06.07 PM.jpeg

Here is a screenShot what it looks like in mobile

More from this blog

Web Developer having good knowledge in designing and problem solving skills. I have an ample amount of experience in Frontend Technology

13 posts

I am a FullStack developer having good amount of experience in FrontEnd Technology like Html,css,javascript,React,Flutter,Node js,Database.I am a good problem solver having knowledge in DSA