To import ZetaGrid into a Dart file:
import 'package:zeta_flutter/zeta_flutter.dart';
import 'package:zeta_flutter/zeta_flutter.dart';
class ZetaGridExample extends StatelessWidget{
const ZetaGridExample({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return ZetaGrid(...);
}
}
To ensure all components work as intended, applications should have ZetaTheme.zeta applied at their top level; typically within MaterialApp or wrapping its equivalent:
import 'package:flutter/material.dart';
import 'package:zeta_flutter/src/theme/theme.dart';
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ZetaTheme.zeta,
builder: (context, child) => ...,
);
}
}
or
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:zeta_flutter/src/theme/theme.dart';
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return Theme(
data: ZetaTheme.zeta,
child: CupertinoApp(
builder: (context, child) => ...,
),
);
}
}