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

outdated

Collection of theme-aware flutter auth-related widgets such as social sign in buttons, splash page, and sign in page, etc.

example/lib/main.dart

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

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  OutlinedBorder getBorder(Set<MaterialState> states) {
    return RoundedRectangleBorder(
      borderRadius: BorderRadius.circular(24),
    );
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      themeMode: ThemeMode.light,
      theme: ThemeData(
        brightness: Brightness.light,
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
        elevatedButtonTheme: ElevatedButtonThemeData(
            style: ButtonStyle(
          shape: MaterialStateProperty.resolveWith(getBorder),
        )),
      ),
      darkTheme: ThemeData(
        brightness: Brightness.dark,
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
        elevatedButtonTheme: ElevatedButtonThemeData(
            style: ButtonStyle(
          shape: MaterialStateProperty.resolveWith(getBorder),
        )),
      ),
      home: MyHomePage(title: 'Arculus Auth Widgets'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

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

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Container(
        padding: const EdgeInsets.all(16),
        child: Column(
          children: <Widget>[
            SizedBox(height: 32),
            GenericEmailButton(
              label: 'Sign in with Email',
              onPressed: (_) {},
            ),
            SizedBox(height: 8),
            GenericAppleButton(
              label: 'Sign in with Apple',
              onPressed: (_) {},
            ),
            SizedBox(height: 8),
            Theme(
              data: Theme.of(context).copyWith(brightness: Brightness.dark),
              child: GenericGoogleButton(
                label: 'Sign in with Google',
                onPressed: (_) {},
              ),
            ),
            SizedBox(height: 64),
            ArculusEmailButton(
              label: 'Sign in with Email',
              onPressed: (_) {},
            ),
            SizedBox(height: 16),
            ArculusAppleButton(
              label: 'Sign in with Apple',
              onPressed: (_) {},
            ),
            SizedBox(height: 16),
            ArculusGoogleButton(
              label: 'Sign in with Google',
              onPressed: (_) {},
            ),
          ],
        ),
      ),
    );
  }
}
5
likes
0
pub points
23%
popularity

Publisher

verified publishermoseskarunia.com

Collection of theme-aware flutter auth-related widgets such as social sign in buttons, splash page, and sign in page, etc.

Repository

License

unknown (LICENSE)

Dependencies

flutter, flutter_svg

More

Packages that depend on arculus_auth_widgets