Skip to content

Commit

Permalink
add Assets.search.svg
Browse files Browse the repository at this point in the history
  • Loading branch information
D3bi7 committed Dec 19, 2024
1 parent 84ab1ea commit 27f81e5
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 67 deletions.
75 changes: 37 additions & 38 deletions lib/pages/scan/scan.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import 'package:pola_flutter/theme/colors.dart';
import 'package:pola_flutter/theme/text_size.dart';
import 'package:pola_flutter/ui/menu_icon_button.dart';
import 'package:pola_flutter/ui/web_view_dialog.dart';
import 'package:flutter_svg/flutter_svg.dart';

class MainPage extends StatefulWidget {
@override
Expand Down Expand Up @@ -72,41 +71,41 @@ class _MainPageState extends State<MainPage> {
children: <Widget>[
_buildQrView(context),
SafeArea(
child: Column(
children: <Widget>[
Center(
child: Padding(
padding: const EdgeInsets.only(top: 20.0),
child: Padding(
padding:
const EdgeInsets.symmetric(vertical: 20.0, horizontal: 16.0),
child: Column(
children: <Widget>[
Center(
child: Container(
width: 328,
height: 40,
padding: const EdgeInsets.symmetric(
horizontal: 10.0, vertical: 10.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(25),
),
child: Row(
children: [
Padding(
padding:
const EdgeInsets.only(left: 20.0, right: 10),
child: SvgPicture.asset(
'assets/search.svg',
),
padding: const EdgeInsets.symmetric(horizontal: 10),
child: Assets.search.svg(),
),
Text(
'Wyszukaj',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w400,
color: Colors.black,
Expanded(
child: Text(
'Wyszukaj',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w400,
color: Colors.black,
),
),
),
],
),
),
),
),
],
],
),
),
),
SafeArea(
Expand Down Expand Up @@ -145,24 +144,24 @@ class _MainPageState extends State<MainPage> {
mainAxisAlignment: MainAxisAlignment.end,
children: [
Expanded(
child: CompaniesList(state, listScrollController)),
Column(
children: [
GestureDetector(
onTap: () {
_scanBloc.add(ScanEvent.torchSwitched());
cameraController.toggleTorch();
},
child: Container(
decoration: BoxDecoration(
boxShadow: [],
),
child: state.isTorchOn
? Assets.scan.flashlightOn.svg()
: Assets.scan.flashlightOff.svg(),
child: CompaniesList(state, listScrollController),
),
Padding(
padding: const EdgeInsets.only(left: 8.0),
child: GestureDetector(
onTap: () {
_scanBloc.add(ScanEvent.torchSwitched());
cameraController.toggleTorch();
},
child: Container(
decoration: BoxDecoration(
boxShadow: [],
),
)
],
child: state.isTorchOn
? Assets.scan.flashlightOn.svg()
: Assets.scan.flashlightOff.svg(),
),
),
)
],
);
Expand Down
33 changes: 4 additions & 29 deletions lib/theme/assets.gen.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 27f81e5

Please sign in to comment.