Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ============== pubspecs.yaml file ==================
- flutter_svg: 1.0.3
- import 'package:flutter_svg/flutter_svg.dart';
- ============== How to Use it =========================
- SizedBox(
- height: 30,
- ),
- appBar1(title: "Payment for services", context: context),
- SizedBox(
- height: 10,
- ),
- ================ App Bar Code (place it openly in any dart file) ===================
- import 'package:flutter/material.dart';
- import 'package:legalapp/colors.dart';
- import 'package:legalapp/components/AppDrawer.dart';
- import 'package:flutter_svg/flutter_svg.dart';
- Container appBar1({required context, title,theme}) {
- return Container(
- color: AppColors.primaryColor,
- padding: EdgeInsets.only(top: 5.0,bottom: 5.0),
- width: MediaQuery.of(context).size.width,
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- InkWell(
- onTap: () {
- AppDrawer.of(context)!.toggle();
- },
- child: Icon(
- Icons.menu,
- size: 40,
- color: theme??AppColors.primaryTextColor,
- ),
- ),
- Text(
- title ?? "Categories",
- style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold,color: AppColors.primaryTextColor),
- ),
- InkWell(
- onTap: () {
- // context.open();
- AppDrawer.of(context)!.toggle();
- },
- child: SvgPicture.asset(
- 'assets/icons/Menu.svg',
- height: 8,
- width: 18,
- color: theme??Colors.black,
- semanticsLabel: 'A red up arrow',
- ),
- ),
- ],
- ),
- );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement