gooyaan 0.0.3 copy "gooyaan: ^0.0.3" to clipboard
gooyaan: ^0.0.3 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: "549366680572-jy4-kOuUkr",
            postId: "4327092574",
            showFullPreview: true,
            articleStyle: ArticleStyle.light,
            onPrepared: (post) {

            },
          ),
        ),
      ),
    );
  }

  void test() async {
    final x= await getArticles(apiKey: "549366680572-jy4-kOuUkr");
    print(x);
  }
}