visible_opacity 1.0.0+2

  • Readme
  • Changelog
  • Example
  • Installing
  • 81

visible_opacity #

A pluggin, similar to the provided AnimatedOpacity, but more useful in cases when you wish to be able to control the transition between more than 2 items.

Getting Started #

import 'package:visible_opacity/visible_opacity.dart';

Column(
    children: [
      VisibleOpacity(
        child: Container(),
        visible: isVisible,
        duration: Duration(milliseconds: 200),
      ),
      VisibleOpacity(
        child: Container(),
        visible: !isVisible,
        duration: Duration(milliseconds: 200),
      ),
    ],
)

[1.0.0+2] - 07 February 2020. #

  • Added LICENSE.

[1.0.0+1] - 07 February 2020. #

  • Added example.

[1.0.0] - 07 February 2020. #

  • Control visibility with a crossfade between multiple widgets.

example/lib/main.dart

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

void main() => runApp(VisibleOpacityExample());
class VisibleOpacityExample extends StatefulWidget {
  @override
  State<StatefulWidget> createState() => new _VisibleOpacityExampleState();
}

class _VisibleOpacityExampleState extends State<VisibleOpacityExample> {
	bool isVisible = false;
	final animationDuration = Duration(milliseconds: 250);

	@override
	Widget build(BuildContext context) {
		return MaterialApp(
			title: 'Vibisle Opacity',
			home: Scaffold(
				body: Column(
					children: [
						VisibleOpacity(
							child: Container(),
							visible: isVisible,
							duration: animationDuration,
						),
						VisibleOpacity(
							child: Container(),
							visible: !isVisible,
							duration: animationDuration,
						),
					],
				),
			),
		);
	}
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  visible_opacity: ^1.0.0+2

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:visible_opacity/visible_opacity.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
62
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
81
Learn more about scoring.

We analyzed this package on Jul 8, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.14
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

Because:

  • visible_opacity that is a package requiring null.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.1
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies
flutter_test