appsonair_flutter_appremark 0.2.8 copy "appsonair_flutter_appremark: ^0.2.8" to clipboard
appsonair_flutter_appremark: ^0.2.8 copied to clipboard

AppsOnAir AppRemark flutter sdk allows you to capture current screen on device shake directly through AppsOnAir.

example/lib/main.dart

import 'package:appsonair_flutter_appremark/app_remark_service.dart';
import 'package:flutter/material.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: const DemoApp(),
      ),
    );
  }
}

class DemoApp extends StatefulWidget {
  const DemoApp({super.key});

  @override
  State<DemoApp> createState() => _DemoAppState();
}

class _DemoAppState extends State<DemoApp> {
  @override
  void initState() {
    super.initState();
    Future.delayed(const Duration(milliseconds: 300), () async {
      if (!mounted) return;
      await AppRemarkService.initialize(
        context,
        options: {
          "pageBackgroundColor": "#70d20f",
          "appBarBackgroundColor": "#70d20f",
          "descriptionLabelText": "Add description here.",
          "appBarTitleColor": "#FFFFFF",
          "remarkTypeLabelText": "Add Remark.",
          "descriptionHintText": "Add description.",
          "descriptionMaxLength": 120,
          "buttonText": "Submit Remark",
          "buttonTextColor": "#000000",
          "labelColor": "#FFFFFF",
          "buttonBackgroundColor": "#FFFFFF",
          "inputTextColor": "#000000",
          "hintColor": "#000000",
          "appBarTitleText": "AppRemark"
        },
        onRemarkResponse: (result) {
          // Handle your app remark status here..
        },
      );
      await AppRemarkService.setAdditionalMetaData(extraPayload: {
        "userName": "USER_NAME",
        "userId": "USER_ID",
        "openUsingShake": "true",
      });
      setState(() {});
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.amber.shade100,
      body: Center(
        child: ElevatedButton(
          onPressed: () async {
            // to open "Add Remark" screen manually
            await AppRemarkService.setAdditionalMetaData(extraPayload: {
              "userName": "USER_NAME",
              "userId": "USER_ID",
              "openUsingShake": "false",
            });
            if (!context.mounted) return;
            await AppRemarkService.addRemark(context);
          },
          child: const Text('Add Remark'),
        ),
      ),
    );
  }
}
1
likes
150
points
120
downloads

Documentation

API reference

Publisher

verified publisherappsonair.com

Weekly Downloads

AppsOnAir AppRemark flutter sdk allows you to capture current screen on device shake directly through AppsOnAir.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on appsonair_flutter_appremark

Packages that implement appsonair_flutter_appremark