-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #288 from takenet/feature/999999-blue-messenger
Feature/999999 blue messenger
- Loading branch information
Showing
125 changed files
with
2,086 additions
and
456 deletions.
There are no files selected for viewing
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,4 @@ | ||
{ | ||
"flutter": "stable", | ||
"flavors": {} | ||
} |
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
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
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 |
---|---|---|
|
@@ -7,5 +7,6 @@ enum DSDeliveryReportStatus { | |
consumed, | ||
failed, | ||
sending, | ||
dispatched, | ||
unknown, | ||
} |
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,33 @@ | ||
import 'ds_active_message_template.model.dart'; | ||
import 'ds_active_message_template_content.model.dart'; | ||
|
||
class DSActiveMessage { | ||
DSActiveMessage({ | ||
required this.type, | ||
this.template, | ||
this.templateContent, | ||
}); | ||
|
||
final String type; | ||
final DSActiveMessageTemplate? template; | ||
final DSActiveMessageTemplateContent? templateContent; | ||
|
||
factory DSActiveMessage.fromJson(Map<String, dynamic> json) { | ||
return DSActiveMessage( | ||
type: json['type'], | ||
template: json['template'] != null | ||
? DSActiveMessageTemplate.fromJson(json['template']) | ||
: null, | ||
templateContent: | ||
DSActiveMessageTemplateContent.fromJson(json['templateContent']), | ||
); | ||
} | ||
|
||
Map<String, dynamic> toJson() { | ||
return { | ||
'type': type, | ||
'template': template, | ||
'templateContent': templateContent, | ||
}; | ||
} | ||
} |
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,31 @@ | ||
class DSActiveMessageTemplate { | ||
const DSActiveMessageTemplate({ | ||
this.name, | ||
this.language, | ||
this.components, | ||
}); | ||
|
||
final String? name; | ||
final Map<String, dynamic>? language; | ||
final List<Map<String, dynamic>>? components; | ||
|
||
factory DSActiveMessageTemplate.fromJson(Map<String, dynamic> json) { | ||
return DSActiveMessageTemplate( | ||
name: json['name'], | ||
language: (json['language'] as Map<String, dynamic>?)?.map( | ||
(key, value) => MapEntry(key, value), | ||
), | ||
components: (json['components'] as List<dynamic>?) | ||
?.map((e) => e as Map<String, dynamic>) | ||
.toList(), | ||
); | ||
} | ||
|
||
Map<String, dynamic> toJson() { | ||
return { | ||
'name': name, | ||
'language': language, | ||
'components': components, | ||
}; | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
lib/src/models/ds_active_message_template_content.model.dart
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,29 @@ | ||
class DSActiveMessageTemplateContent { | ||
const DSActiveMessageTemplateContent({ | ||
this.name, | ||
this.language, | ||
this.components, | ||
}); | ||
|
||
final String? name; | ||
final String? language; | ||
final List<Map<String, dynamic>>? components; | ||
|
||
factory DSActiveMessageTemplateContent.fromJson(Map<String, dynamic> json) { | ||
return DSActiveMessageTemplateContent( | ||
name: json['name'], | ||
language: json['language'], | ||
components: (json['components'] as List<dynamic>?) | ||
?.map((e) => e as Map<String, dynamic>) | ||
.toList(), | ||
); | ||
} | ||
|
||
Map<String, dynamic> toJson() { | ||
return { | ||
'name': name, | ||
'language': language, | ||
'components': components, | ||
}; | ||
} | ||
} |
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,31 @@ | ||
import '../extensions/ds_localization.extension.dart'; | ||
|
||
class DSLocation { | ||
DSLocation({ | ||
required this.text, | ||
this.latitude, | ||
this.longitude, | ||
}); | ||
|
||
final double? latitude; | ||
final double? longitude; | ||
final String text; | ||
|
||
factory DSLocation.fromJson(Map<String, dynamic> json) { | ||
return DSLocation( | ||
latitude: double.tryParse(json['latitude']?.toString() ?? ''), | ||
longitude: double.tryParse(json['longitude']?.toString() ?? ''), | ||
text: (json['text']?.isNotEmpty ?? false) | ||
? json['text'] | ||
: 'location.text'.translate(), | ||
); | ||
} | ||
|
||
Map<String, dynamic> toJson() { | ||
return { | ||
'latitude': latitude, | ||
'longitude': longitude, | ||
'text': text, | ||
}; | ||
} | ||
} |
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,19 @@ | ||
import 'package:flutter/widgets.dart'; | ||
|
||
class DSMediaReplyContentProps { | ||
String mediaTextTranslateKey; | ||
IconData mediaIcon; | ||
Widget trailing; | ||
double size; | ||
String title; | ||
Widget? subtitle; | ||
|
||
DSMediaReplyContentProps({ | ||
required this.mediaTextTranslateKey, | ||
required this.mediaIcon, | ||
this.title = '', | ||
this.trailing = const SizedBox.shrink(), | ||
this.size = 0.0, | ||
this.subtitle, | ||
}); | ||
} |
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
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
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
Oops, something went wrong.