-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created DebugSVGPanel to test complex SVG images rendering [#4266].
- Loading branch information
1 parent
8be8d74
commit 12a2b22
Showing
3 changed files
with
728 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* Copyright 2020 Board of Trustees of the University of Illinois. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import 'package:flutter/material.dart'; | ||
import 'package:pinch_zoom/pinch_zoom.dart'; | ||
import 'package:rokwire_plugin/service/styles.dart'; | ||
import 'package:illinois/ui/widgets/HeaderBar.dart'; | ||
import 'package:flutter_svg/flutter_svg.dart'; | ||
|
||
class DebugSVGPanel extends StatefulWidget{ | ||
_DebugSVGPanelState createState() => _DebugSVGPanelState(); | ||
} | ||
|
||
class _DebugSVGPanelState extends State<DebugSVGPanel>{ | ||
|
||
@override | ||
void initState() { | ||
super.initState(); | ||
} | ||
|
||
@override | ||
void dispose() { | ||
super.dispose(); | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
backgroundColor: Styles().colors.surface, | ||
appBar: HeaderBar(title: "SVG Test",), | ||
body: PinchZoom(maxScale: 12, child: _svgPictureWidget), | ||
); | ||
} | ||
|
||
Widget get _svgPictureWidget => | ||
SvgPicture.asset( | ||
'images/building-example.svg', | ||
semanticsLabel: 'Building Example' | ||
); | ||
} | ||
|
||
|