before_after 1.0.1 copy "before_after: ^1.0.1" to clipboard
before_after: ^1.0.1 copied to clipboard

outdated

A flutter package which makes it easier to display the difference between two images.

example/lib/main.dart

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

class MyHomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('Before After'), centerTitle: true),
      body: Column(
        mainAxisAlignment: MainAxisAlignment.spaceEvenly,
        children: <Widget>[
          BeforeAfter(
            beforeImage: Image.asset('assets/after.jpg'),
            afterImage: Image.asset('assets/before.jpg'),
          ),
        ],
      ),
    );
  }
}
166
likes
40
pub points
93%
popularity

Publisher

verified publisherxdsahil.dev

A flutter package which makes it easier to display the difference between two images.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on before_after