posts 0.0.2 copy "posts: ^0.0.2" to clipboard
posts: ^0.0.2 copied to clipboard

A post template for flutter.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:posts/posts.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(
        // This is the theme of your application.
        //
        // Try running your application with "flutter run". You'll see the
        // application has a blue toolbar. Then, without quitting the app, try
        // changing the primarySwatch below to Colors.green and then invoke
        // "hot reload" (press "r" in the console where you ran "flutter run",
        // or simply save your changes to "hot reload" in a Flutter IDE).
        // Notice that the counter didn't reset back to zero; the application
        // is not restarted.
        primarySwatch: Colors.blue,
        // This makes the visual density adapt to the platform that you run
        // the app on. For desktop platforms, the controls will be smaller and
        // closer together (more dense) than on mobile platforms.
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: DashBoard(),
    );
  }
}

class DashBoard extends StatelessWidget {
  increment() {
    var counter = 1;
    counter = counter + 1;
    print(counter);
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(),
      body: Post(
          200,
          200,
          "https://brookesnews.com/wp-content/uploads/2020/01/top-ski-resorts-world-united-states-colorado-aspen-snowmass.jpg",
          true,
          increment,
          increment,
          increment),
    );
  }
}
1
likes
30
pub points
0%
popularity

Publisher

unverified uploader

A post template for flutter.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on posts