This commit is contained in:
yuvaraj.gajaraj 2021-04-08 15:44:11 +05:30
Родитель b7c9f103b8
Коммит 22d380fab5
10 изменённых файлов: 309 добавлений и 202 удалений

Двоичные данные
images/code.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.5 KiB

Просмотреть файл

@ -1,13 +0,0 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=D:\flutter SDK 2.0\flutter"
export "FLUTTER_APPLICATION_PATH=D:\rp19\SB release 19.1\flutter-samplebrowser\flutter_examples\flutter_examples"
export "FLUTTER_TARGET=lib\main.dart"
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build\ios"
export "FLUTTER_BUILD_NAME=18.4.30"
export "FLUTTER_BUILD_NUMBER=18.4.30"
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=false"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=.packages"

Просмотреть файл

@ -1,33 +0,0 @@
//
// Generated file. Do not edit.
//
#import "GeneratedPluginRegistrant.h"
#if __has_include(<path_provider/FLTPathProviderPlugin.h>)
#import <path_provider/FLTPathProviderPlugin.h>
#else
@import path_provider;
#endif
#if __has_include(<syncfusion_flutter_pdfviewer/SyncfusionFlutterPdfViewerPlugin.h>)
#import <syncfusion_flutter_pdfviewer/SyncfusionFlutterPdfViewerPlugin.h>
#else
@import syncfusion_flutter_pdfviewer;
#endif
#if __has_include(<url_launcher/FLTURLLauncherPlugin.h>)
#import <url_launcher/FLTURLLauncherPlugin.h>
#else
@import url_launcher;
#endif
@implementation GeneratedPluginRegistrant
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry {
[FLTPathProviderPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTPathProviderPlugin"]];
[SyncfusionFlutterPdfViewerPlugin registerWithRegistrar:[registry registrarForPlugin:@"SyncfusionFlutterPdfViewerPlugin"]];
[FLTURLLauncherPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTURLLauncherPlugin"]];
}
@end

Просмотреть файл

@ -95,13 +95,13 @@ class _FullViewSampleLayout extends StatelessWidget {
sample!.codeLink != '')
? Padding(
padding: const EdgeInsets.fromLTRB(
0, 0, 8, 0),
0, 0, 10, 0),
child: Container(
height: 37,
width: 37,
height: 40,
width: 40,
child: IconButton(
icon: Image.asset(
'images/git_hub_mobile.png',
'images/code.png',
color: Colors.white),
onPressed: () {
launch(sample!.codeLink!);
@ -132,13 +132,13 @@ class _FullViewSampleLayout extends StatelessWidget {
? (<Widget>[
Padding(
padding: const EdgeInsets.fromLTRB(
0, 0, 8, 0),
0, 0, 10, 0),
child: Container(
height: 37,
width: 37,
height: 40,
width: 40,
child: IconButton(
icon: Image.asset(
'images/git_hub_mobile.png',
'images/code.png',
color: Colors.white),
onPressed: () {
launch(sample!.codeLink!);

Просмотреть файл

@ -196,13 +196,12 @@ class _LayoutPageState extends State<LayoutPage> {
visible: _showIcon && currentSample != null,
child: Padding(
padding:
const EdgeInsets.fromLTRB(0, 0, 8, 0),
const EdgeInsets.fromLTRB(0, 0, 10, 0),
child: Container(
height: 37,
width: 37,
height: 40,
width: 40,
child: IconButton(
icon: Image.asset(
'images/git_hub_mobile.png',
icon: Image.asset('images/code.png',
color: Colors.white),
onPressed: () {
launch(currentSample!.codeLink!);

Просмотреть файл

@ -326,7 +326,7 @@ class SampleModel extends Listenable {
Color webBackgroundColor = const Color.fromRGBO(246, 246, 246, 1);
/// Holds theme based color of icon
Color webIconColor = const Color.fromRGBO(0, 0, 0, 0.54);
Color webIconColor = const Color.fromRGBO(55, 55, 55, 1);
/// Holds theme based input container color
Color webInputColor = const Color.fromRGBO(242, 242, 242, 1);
@ -436,7 +436,7 @@ class SampleModel extends Listenable {
{
dividerColor = const Color.fromRGBO(61, 61, 61, 1);
cardColor = const Color.fromRGBO(48, 48, 48, 1);
webIconColor = const Color.fromRGBO(255, 255, 255, 0.65);
webIconColor = const Color.fromRGBO(230, 230, 230, 1);
webOutputContainerColor = const Color.fromRGBO(23, 23, 23, 1);
webInputColor = const Color.fromRGBO(44, 44, 44, 1);
webBackgroundColor = const Color.fromRGBO(33, 33, 33, 1);
@ -450,7 +450,7 @@ class SampleModel extends Listenable {
{
dividerColor = const Color.fromRGBO(204, 204, 204, 1);
cardColor = Colors.white;
webIconColor = const Color.fromRGBO(0, 0, 0, 0.54);
webIconColor = const Color.fromRGBO(55, 55, 55, 1);
webOutputContainerColor = Colors.white;
webInputColor = const Color.fromRGBO(242, 242, 242, 1);
webBackgroundColor = const Color.fromRGBO(246, 246, 246, 1);

Просмотреть файл

@ -1033,8 +1033,7 @@ class SampleOutputContainerState extends State<_SampleOutputContainer> {
mainAxisAlignment:
MainAxisAlignment.end,
children: <Widget>[
Flexible(
child: SizedBox(
Container(
height: 21,
width: 21,
child: InkWell(
@ -1048,50 +1047,44 @@ class SampleOutputContainerState extends State<_SampleOutputContainer> {
? 'images/git_hub_dark.png'
: 'images/git_hub.png',
fit: BoxFit.contain)),
)),
Padding(
padding: EdgeInsets.only(
left: width < 500
? 5
: 10)),
Flexible(
child: InkWell(
onTap: () {
performMaximize(
_model, _sample);
},
child: Transform.scale(
scale: 0.85,
child: Icon(
Icons.open_in_full,
color: _model
.webIconColor),
),
),
),
Padding(
padding: EdgeInsets.only(
left: width < 500
? 5
: 10)),
Flexible(
child:
_sample.needsPropertyPanel ==
true
? InkWell(
onTap: () {
outputScaffoldKey
.currentState!
.openEndDrawer();
},
child: Icon(
Icons.menu,
color: _model
.webIconColor),
)
: SizedBox.fromSize(
size: Size.zero),
const Padding(
padding:
EdgeInsets.only(left: 12),
),
InkWell(
onTap: () {
performMaximize(
_model, _sample);
},
child: Container(
child: Transform.scale(
scale: 0.85,
child: Icon(
Icons.open_in_full,
color: _model
.webIconColor))),
),
const Padding(
padding:
EdgeInsets.only(left: 12),
),
_sample.needsPropertyPanel == true
? Container(
height: 24,
width: 24,
child: InkWell(
onTap: () {
outputScaffoldKey
.currentState!
.openEndDrawer();
},
child: Icon(Icons.menu,
color: _model
.webIconColor),
),
)
: Container(),
]),
),
Expanded(

Просмотреть файл

@ -21,36 +21,10 @@ class _PaginationState extends SampleViewState {
double? diff;
int segmentedControlGroupValue = 0;
int degree = 25;
String day = 'Friday, 01:00 am';
String day = 'Friday, 04:00 am';
String _imageName = 'images/sunny_image.png';
double _visibleMin = 0;
double _visibleMax = 5;
final List<String> _daysWithTime = const <String>[
'Friday, 01:00 am',
'Saturday, 01:00 am',
'Sunday, 01:00 am',
'Monday, 01:00 am',
'Tuesday, 01:00 am'
];
final List<String> _temperatue = const <String>[
'25°19°',
'25°20°',
'24°18°',
'19°14°',
'18°14°'
];
final List<String> _images = const <String>[
'sunny_image.png',
'sunny_image.png',
'cloudy.png',
'cloudy.png',
'rainy.png'
];
final List<String> _days = const <String>['Fri', 'Sat', 'Sun', 'Mon', 'Tue'];
final List<double> _minValues = const <double>[0, 6, 12, 18, 24];
final List<double> _maxValues = const <double>[5, 11, 17, 23, 29];
final List<int> _degrees = const <int>[25, 25, 24, 19, 18];
List<ChartSampleData> chartData = <ChartSampleData>[
ChartSampleData(xValue: '0', x: '1 am', y: 20),
ChartSampleData(xValue: '1', x: '4 am', y: 20),
@ -95,7 +69,11 @@ class _PaginationState extends SampleViewState {
: double.infinity;
height = MediaQuery.of(context).size.height;
_calculateHeight();
_containerHeight = 30;
_containerHeight = orientation == Orientation.landscape
? model.isWebFullView
? 30
: height * 0.075
: 30;
return Center(
child: Column(children: [
Container(
@ -145,16 +123,38 @@ class _PaginationState extends SampleViewState {
width: _segmentedControlWidth,
child: _buildCartesianChart())),
Visibility(
visible: height < 350 ? false : true,
visible: //model.isWebFullView
//?
height < 350 ? false : true,
// : true,
child: Container(
padding: model.isWebFullView
? EdgeInsets.fromLTRB(0, 16, 0, 16)
: EdgeInsets.fromLTRB(0, 8, 0, 8),
padding:
orientation == Orientation.landscape && !model.isWebFullView
? EdgeInsets.all(0)
: model.isWebFullView
? EdgeInsets.fromLTRB(0, 16, 0, 16)
: EdgeInsets.fromLTRB(0, 8, 0, 8),
// alignment: Alignment.center,
width: _segmentedControlWidth,
child: CupertinoSlidingSegmentedControl(
groupValue: segmentedControlGroupValue,
children: _getButtons(orientation),
onValueChanged: (int? i) => _loadGroupValue(i!))))
onValueChanged: (int? i) {
setState(() {
if (i == 0) {
_loadZerothGroupValue();
} else if (i == 1) {
_loadFirstGroupValue();
} else if (i == 2) {
_loadSecondGroupValue();
} else if (i == 3) {
_loadThirdGroupValue();
} else if (i == 4) {
_loadFourthGroupValue();
}
});
})))
//)
]));
}
@ -187,36 +187,87 @@ class _PaginationState extends SampleViewState {
_containerWidth = _segmentedControlWidth == double.infinity
? width / 5
: _segmentedControlWidth / 5;
final double fontSize = _orientation == Orientation.landscape
? model.isWebFullView
? 12
: 10
: 12;
final Color color = model.currentThemeData?.brightness == Brightness.light
? const Color.fromRGBO(104, 104, 104, 1)
: const Color.fromRGBO(242, 242, 242, 1);
final ButtonStyle style = ButtonStyle(
backgroundColor: MaterialStateProperty.resolveWith(getColor),
);
final Map<int, Widget> buttons = <int, Widget>{};
for (int i = 0; i <= 4; i++) {
buttons.putIfAbsent(
i,
() => Container(
width: _containerWidth,
child: TextButton(
onPressed: () => _loadGroupValue(i),
style: style,
child: Column(
children: <Widget>[
Text(_days[i],
style: TextStyle(fontSize: 12, color: color)),
_getContainer('images/' + _images[i]),
Text(_temperatue[i],
style: TextStyle(fontSize: 12, color: color)),
],
))),
);
}
final Map<int, Widget> buttons = <int, Widget>{
0: Container(
width: _containerWidth,
child: TextButton(
onPressed: () => setState(() => _loadZerothGroupValue()),
style: style,
child: Column(
children: <Widget>[
_getText('Fri', fontSize, color),
_getContainer('images/sunny_image.png'),
_getText('25°19°', fontSize, color),
],
))),
1: Container(
width: _containerWidth,
child: TextButton(
onPressed: () => setState(() => _loadFirstGroupValue()),
style: style,
child: Column(
children: <Widget>[
_getText('Sat', fontSize, color),
_getContainer('images/sunny_image.png'),
_getText('25°20°', fontSize, color),
],
))),
2: Container(
width: _containerWidth,
child: TextButton(
onPressed: () => setState(() => _loadSecondGroupValue()),
style: style,
child: Column(
children: <Widget>[
_getText('Sun', fontSize, color),
_getContainer('images/cloudy.png'),
_getText('24°18°', fontSize, color),
],
))),
3: Container(
width: _containerWidth,
child: TextButton(
onPressed: () => setState(() => _loadThirdGroupValue()),
style: style,
child: Column(
children: <Widget>[
_getText('Mon', fontSize, color),
_getContainer('images/cloudy.png'),
_getText('19°14°', fontSize, color),
],
))),
4: Container(
width: _containerWidth,
child: TextButton(
onPressed: () => setState(() => _loadFourthGroupValue()),
style: style,
child: Column(
children: <Widget>[
_getText('Tue', fontSize, color),
_getContainer('images/rainy.png'),
_getText('18°14°', fontSize, color),
],
))),
};
return buttons;
}
/// Returns the text widget
Text _getText(String text, double fontSize, Color color) {
return Text(text, style: TextStyle(fontSize: fontSize, color: color));
}
/// Return the image container
Container _getContainer(String imageName) {
return Container(
@ -246,34 +297,79 @@ class _PaginationState extends SampleViewState {
/// Calls while performing the swipe operation
void performSwipe(ChartSwipeDirection direction) {
int? index;
if (_visibleMin == 0 && _visibleMax == 5) {
index = direction == ChartSwipeDirection.end ? 1 : null;
} else if (_visibleMin == 6 && _visibleMax == 11) {
index = direction == ChartSwipeDirection.end ? 2 : 0;
} else if (_visibleMin == 12 && _visibleMax == 17) {
index = direction == ChartSwipeDirection.end ? 3 : 1;
} else if (_visibleMin == 18 && _visibleMax == 23) {
index = direction == ChartSwipeDirection.end ? 4 : 2;
} else if (_visibleMin == 24 && _visibleMax == 29) {
index = direction == ChartSwipeDirection.end ? null : 3;
}
if (index != null) {
_loadGroupValue(index);
}
setState(() {
if (direction == ChartSwipeDirection.end) {
if (_visibleMin == 0 && _visibleMax == 5) {
_loadFirstGroupValue();
} else if (_visibleMin == 6 && _visibleMax == 11) {
_loadSecondGroupValue();
} else if (_visibleMin == 12 && _visibleMax == 17) {
_loadThirdGroupValue();
} else if (_visibleMin == 18 && _visibleMax == 23) {
_loadFourthGroupValue();
}
} else {
if (_visibleMin == 24 && _visibleMax == 29) {
_loadThirdGroupValue();
} else if (_visibleMin == 18 && _visibleMax == 23) {
_loadSecondGroupValue();
} else if (_visibleMin == 12 && _visibleMax == 17) {
_loadFirstGroupValue();
} else if (_visibleMin == 6 && _visibleMax == 11) {
_loadZerothGroupValue();
}
}
});
}
/// load the values based on the provided index
void _loadGroupValue(int index) {
setState(() {
_visibleMin = _minValues[index];
_visibleMax = _maxValues[index];
segmentedControlGroupValue = index;
degree = _degrees[index];
day = _daysWithTime[index];
_imageName = 'images/' + _images[index];
});
/// load the value when the zeroth segmented group value is selected
void _loadZerothGroupValue() {
_visibleMin = 0;
_visibleMax = 5;
segmentedControlGroupValue = 0;
degree = 25;
day = 'Friday, 04:00 am';
_imageName = 'images/sunny_image.png';
}
/// load the value when the first segmented group value is selected
void _loadFirstGroupValue() {
_visibleMin = 6;
_visibleMax = 11;
segmentedControlGroupValue = 1;
degree = 25;
day = 'Saturday, 01:00 am';
_imageName = 'images/sunny_image.png';
}
/// load the value when the second segmented group value is selected
void _loadSecondGroupValue() {
_visibleMin = 12;
_visibleMax = 17;
segmentedControlGroupValue = 2;
degree = 24;
day = 'Sunday, 01:00 am';
_imageName = 'images/cloudy.png';
}
/// load the value when the third segmented group value is selected
void _loadThirdGroupValue() {
_visibleMin = 18;
_visibleMax = 23;
segmentedControlGroupValue = 3;
degree = 19;
day = 'Monday, 01:00 am';
_imageName = 'images/cloudy.png';
}
/// load the value when the fourth segmented group value is selected
void _loadFourthGroupValue() {
_visibleMin = 24;
_visibleMax = 29;
segmentedControlGroupValue = 4;
degree = 18;
day = 'Tuesday, 01:00 am';
_imageName = 'images/rainy.png';
}
/// Returns the cartesian chart

Просмотреть файл

@ -16,21 +16,86 @@ dependencies:
path_provider_macos: ^2.0.0
desktop_window: 0.4.0
syncfusion_flutter_datagrid: ^19.1.54-beta
syncfusion_flutter_calendar: ^19.1.54
syncfusion_flutter_datepicker: ^19.1.54-beta
syncfusion_flutter_charts: ^19.1.54
syncfusion_flutter_gauges: ^19.1.54
syncfusion_flutter_sliders: ^19.1.54-beta
syncfusion_flutter_pdf: ^19.1.54-beta
syncfusion_flutter_barcodes: ^19.1.54
syncfusion_officechart: ^19.1.54-beta
syncfusion_flutter_maps: ^19.1.54-beta
syncfusion_flutter_signaturepad: ^19.1.54-beta
syncfusion_flutter_pdfviewer: ^19.1.54-beta
syncfusion_flutter_treemap: ^19.1.54-beta
syncfusion_flutter_datagrid:
git:
url: https://buildautomation:Coolcomp299@gitlab.syncfusion.com/essential-studio/flutter-datagrid
path: flutter_datagrid/syncfusion_flutter_datagrid
branch: release/19.1.0.1
ref: release/19.1.0.1
syncfusion_flutter_calendar:
git:
url: https://buildautomation:Coolcomp299@gitlab.syncfusion.com/essential-studio/flutter-calendar
path: flutter_calendar/syncfusion_flutter_calendar
branch: release/19.1.0.1
ref: release/19.1.0.1
syncfusion_flutter_datepicker:
git:
url: https://buildautomation:Coolcomp299@gitlab.syncfusion.com/essential-studio/flutter-datepicker
path: flutter_datepicker/syncfusion_flutter_datepicker
branch: release/19.1.0.1
ref: release/19.1.0.1
syncfusion_flutter_charts:
git:
url: https://buildautomation:Coolcomp299@gitlab.syncfusion.com/essential-studio/flutter-charts
path: flutter_charts/syncfusion_flutter_charts
branch: release/19.1.0.1
ref: release/19.1.0.1
syncfusion_flutter_gauges:
git:
url: https://buildautomation:Coolcomp299@gitlab.syncfusion.com/essential-studio/flutter-gauges
path: flutter_gauges/syncfusion_flutter_gauges
branch: release/19.1.0.1
ref: release/19.1.0.1
syncfusion_flutter_sliders:
git:
url: https://buildautomation:Coolcomp299@gitlab.syncfusion.com/essential-studio/flutter-sliders
path: flutter_sliders/syncfusion_flutter_sliders
branch: release/19.1.0.1
ref: release/19.1.0.1
syncfusion_flutter_pdf:
git:
url: https://buildautomation:Coolcomp299@gitlab.syncfusion.com/essential-studio/flutter-pdf
path: flutter_pdf/syncfusion_flutter_pdf
branch: release/19.1.0.1
ref: release/19.1.0.1
syncfusion_flutter_barcodes:
git:
url: https://buildautomation:Coolcomp299@gitlab.syncfusion.com/essential-studio/flutter-barcodes
path: flutter_barcodes/syncfusion_flutter_barcodes
branch: release/19.1.0.1
ref: release/19.1.0.1
syncfusion_officechart:
git:
url: https://buildautomation:Coolcomp299@gitlab.syncfusion.com/essential-studio/flutter-officechart
path: flutter_officechart/syncfusion_flutter_officechart
branch: release/19.1.0.1
ref: release/19.1.0.1
syncfusion_flutter_maps:
git:
url: https://buildautomation:Coolcomp299@gitlab.syncfusion.com/essential-studio/flutter-maps
path: flutter_maps/syncfusion_flutter_maps
branch: release/19.1.0.1
ref: release/19.1.0.1
syncfusion_flutter_signaturepad:
git:
url: https://buildautomation:Coolcomp299@gitlab.syncfusion.com/essential-studio/flutter-signaturepad
path: flutter_signaturepad/syncfusion_flutter_signaturepad
branch: release/19.1.0.1
ref: release/19.1.0.1
syncfusion_flutter_pdfviewer:
git:
url: https://buildautomation:Coolcomp299@gitlab.syncfusion.com/essential-studio/flutter-pdfviewer
path: flutter_pdfviewer/syncfusion_flutter_pdfviewer
branch: release/19.1.0.1
ref: release/19.1.0.1
syncfusion_flutter_treemap:
git:
url: https://buildautomation:Coolcomp299@gitlab.syncfusion.com/essential-studio/flutter-treemap
path: flutter_treemap/syncfusion_flutter_treemap
branch: release/19.1.0.1
ref: release/19.1.0.1
flutter:
uses-material-design: true
assets:

Просмотреть файл

@ -1,6 +1,6 @@
[Desktop Entry]
Name=Syncfusion Flutter Gallery
Comment=Demos & examples of Syncfusion Flutter widgets.
Comment=Demos & Examples of Syncfusion Flutter Widgets.
Exec=syncfusion-flutter-gallery
Icon=${SNAP}/meta/gui/syncfusion-flutter-gallery.png
Terminal=false