gooyaan 0.0.4 copy "gooyaan: ^0.0.4" to clipboard
gooyaan: ^0.0.4 copied to clipboard

outdated

Gooyaan flutter plugin for show the posts on your own application.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:gooyaan/gooyaan.dart';

void main() {

  runApp(MyApp());
}

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

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    // TODO: implement initState
    super.initState();
    test();
  }


  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: ArticleView(
            apiKey: "161236768827-K1o-ZRa8b8",
            postId: "7876758331",
            showFullPreview: true,
            articleStyle: ArticleStyle.light,
            onPrepared: (post) {

            },
          ),
        ),
      ),
    );
  }

  void test() async {
    final x= await getArticles(apiKey: "161236768827-K1o-ZRa8b8");
    print(x);
  }
}