iws_help 0.1.3 copy "iws_help: ^0.1.3" to clipboard
iws_help: ^0.1.3 copied to clipboard

unlistedoutdated

Add documentation pages and contextual help to widgets using the IWS service.

example/main.dart

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

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  IwsHelp().loadHelp();

  runApp(const MyApp());
}

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
        actions: const [GeneralHelpButton(), SizedBox(width: 10)],
      ),
      body: const Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            HelpIcon(
              helpKey: 'money',
              fullScreen: false,
              child: SizedBox(
                width: 200,
                child: TextField(
                  decoration: InputDecoration(labelText: 'Money'),
                ),
              ),
            ),
            SizedBox(height: 20),
            HelpIcon(
              helpKey: 'recovery_pass',
              fullScreen: true,
              child: SizedBox(
                  width: 300,
                  child: FilledButton(
                      onPressed: null, child: Text('Password recovery'))),
            ),
          ],
        ),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}
0
likes
0
points
24
downloads

Publisher

unverified uploader

Weekly Downloads

Add documentation pages and contextual help to widgets using the IWS service.

Homepage

License

unknown (license)

Dependencies

appflowy_editor, bloc, flutter, flutter_bloc, flutter_markdown, iws_http, iws_http_model, url_launcher

More

Packages that depend on iws_help