braze_plugin 18.0.1 copy "braze_plugin: ^18.0.1" to clipboard
braze_plugin: ^18.0.1 copied to clipboard

This is the Braze plugin for Flutter. Effective marketing automation is an essential part of successfully scaling and managing your business.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'log_console.dart';
import 'screens/home_screen.dart';
import 'theme.dart';

void main() => runApp(const BrazeApp());

/// Root widget for the Braze Flutter sample app.
class BrazeApp extends StatefulWidget {
  const BrazeApp({super.key});

  @override
  State<BrazeApp> createState() => _BrazeAppState();
}

class _BrazeAppState extends State<BrazeApp> {
  final ValueNotifier<bool> _logConsoleVisible = ValueNotifier<bool>(false);

  @override
  void dispose() {
    _logConsoleVisible.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return LogConsoleVisibility(
      notifier: _logConsoleVisible,
      child: MaterialApp(
        title: 'Braze Flare',
        theme: BrazeAppTheme.light,
        home: const HomeScreen(),
        builder: (context, child) {
          return ValueListenableBuilder<bool>(
            valueListenable: _logConsoleVisible,
            builder: (context, visible, _) {
              return Column(
                crossAxisAlignment: CrossAxisAlignment.stretch,
                children: [
                  Visibility(
                    visible: visible,
                    maintainState: true,
                    maintainSize: false,
                    maintainAnimation: true,
                    child: MediaQuery.removePadding(
                      context: context,
                      removeTop: true,
                      child: Column(
                        mainAxisSize: MainAxisSize.min,
                        crossAxisAlignment: CrossAxisAlignment.stretch,
                        children: [
                          const LogConsole(height: 200),
                          Divider(
                            height: 1,
                            thickness: 1,
                            color: Theme.of(context).dividerColor,
                          ),
                        ],
                      ),
                    ),
                  ),
                  Expanded(
                    child: visible
                        ? MediaQuery.removePadding(
                            context: context,
                            removeTop: true,
                            child: child ?? const SizedBox.shrink(),
                          )
                        : (child ?? const SizedBox.shrink()),
                  ),
                ],
              );
            },
          );
        },
      ),
    );
  }
}
33
likes
150
points
162k
downloads

Documentation

API reference

Publisher

verified publisherbraze.com

Weekly Downloads

This is the Braze plugin for Flutter. Effective marketing automation is an essential part of successfully scaling and managing your business.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on braze_plugin

Packages that implement braze_plugin