osam_flutter 2.0.7 copy "osam_flutter: ^2.0.7" to clipboard
osam_flutter: ^2.0.7 copied to clipboard

discontinued
outdated

Navigation and UI elements which fits with Osam library

example/lib/main.dart

import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

void main() async {
  runApp(MaterialApp(
    home: const App(),
  ));
}

class App extends StatefulWidget {
  const App();

  @override
  _AppState createState() => _AppState();
}

class _AppState extends State<App> {
  var isOpposite = false;

  @override
  Widget build(BuildContext context) {
    final el1 = Element(color: Colors.blue);
    final el2 = Element(color: Colors.red);
    return Center(
      child: Column(
        children: <Widget>[
          Row(
            children: isOpposite ? [el1, el2] : [el2, el1],
          ),
          RaisedButton(
            onPressed: () {
              setState(() {
                isOpposite = !isOpposite;
              });
            },
          )
        ],
      ),
    );
  }
}

class Element extends StatefulWidget {
  final Color color;

  const Element({Key key, this.color}) : super(key: key);

  @override
  _ElementState createState() => _ElementState();
}

class _ElementState extends State<Element> {
  @override
  Widget build(BuildContext context) {
    return Container(color: widget.color, width: 50, height: 50);
  }
}
2
likes
0
pub points
0%
popularity

Publisher

verified publisherrenesanse.net

Navigation and UI elements which fits with Osam library

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

after_layout, flutter, osam, provider, stream_transform

More

Packages that depend on osam_flutter