surveysparrow_flutter_sdk 1.2.0 copy "surveysparrow_flutter_sdk: ^1.2.0" to clipboard
surveysparrow_flutter_sdk: ^1.2.0 copied to clipboard

SurveySparrow's flutter SDK lets you collect feedback at various touchpoints from your mobile app users. You can easily embed surveys in your mobile app with a few lines of code.

example/lib/main.dart

import 'package:example/SpotCheckScreen.dart';
import 'package:flutter/material.dart';
import 'package:surveysparrow_flutter_sdk/surveysparrow.dart';

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

final SpotCheck spotCheck = SpotCheck(
  domainName: "",
  targetToken: "",
  // Should Not Pass userDetails as const
  userDetails: {},
  variables: {},
  customProperties: {},
  sparrowLang: "",
);

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: SurveyScreen(),
    );
  }
}

class SurveyScreen extends StatelessWidget {
  SurveyScreen({
    Key? key,
  }) : super(key: key);
  final domainController = TextEditingController();
  final tokenController = TextEditingController();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("SurveySparrow"),
      ),
      body: Builder(
        builder: ((context) => Center(
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.center,
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  ElevatedButton(
                      onPressed: () {
                        Navigator.of(context).push(
                          MaterialPageRoute(
                            builder: (context) => const SpotCheckScreen(),
                          ),
                        );
                      },
                      child: const Text("SpotCheck"))
                ],
              ),
            )),
      ),
    );
  }
}
10
likes
130
points
81
downloads

Publisher

verified publishersurveysparrow.com

Weekly Downloads

SurveySparrow's flutter SDK lets you collect feedback at various touchpoints from your mobile app users. You can easily embed surveys in your mobile app with a few lines of code.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, get, http, shared_preferences, uuid, webview_flutter

More

Packages that depend on surveysparrow_flutter_sdk