harmonyos 0.1.1 copy "harmonyos: ^0.1.1" to clipboard
harmonyos: ^0.1.1 copied to clipboard

Bringing the beautiful HarmonyOS/EMUI 12 look to flutter, experience the best of both worlds!

example/lib/main.dart

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

void main() {
  runApp(const MaterialApp(
    home: MyApp(),
  ));
}

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

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

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return HMAbility(
      body: Column(children: [
        HMButton(onPressed: () {}, child: const Text("Button")),
        HMButton(
            onPressed: () {}, isDanger: true, child: const Text("Danger Button")),
        HMElevatedButton(onPressed: () {}, child: const Text("Elevated Button")),
        HMTextButton(onPressed: () {}, child: const Text("Text Button")),
        HMIconButton(onPressed: () {}, icon: const Icon(Icons.abc)),
        const HMTextInput(placeholder: "Text Input",prefixIcon: Icon(Icons.abc),grey: true,),
        HMElevatedButton(
            onPressed: () {
              showHMDialog(
                  false,
                  context,
                  [
                    HMTextButton(onPressed: () {}, child: const Text("123")),
                    HMTextButton(onPressed: () {}, child: const Text("123"))
                  ],
                  "Test123",
                  const Text("1234"),
                  true);
            },
            child: const Text("Show Dialog"))
      ]),
      title: "HarmonyOS UI Library Example",
      actions:[
        HMIconButton(onPressed: (){}, icon: const Icon(Icons.more_vert_rounded,color: Colors.black,))
      ],
      floatingActionButton: HMFloatingActionButton(
        child: const Icon(
          Icons.add_rounded,
          color: Colors.white,
        ),
        onPress: () {},
      ),
    );
  }
}
8
likes
130
pub points
37%
popularity

Publisher

unverified uploader

Bringing the beautiful HarmonyOS/EMUI 12 look to flutter, experience the best of both worlds!

Repository (GitHub)
View/report issues

Documentation

API reference

License

EPL-2.0 (LICENSE)

Dependencies

flutter, sprung

More

Packages that depend on harmonyos