View for_loops_in_flutter_go_round_and_round.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
Checkbox( | |
value: ref.watch(boolNr1.state).state, | |
onChanged: (value) { | |
ref.watch(boolNr1.state).state = value; | |
}, | |
), | |
Checkbox( | |
value: ref.watch(boolNr2.state).state, | |
onChanged: (value) { | |
ref.watch(boolNr2.state).state = value; |
View statemgmt.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
import 'package:flutter_riverpod/flutter_riverpod.dart'; | |
import 'package:oldtimer_app/models/vehicle.dart'; | |
import 'package:oldtimer_app/services/database/controller_data.dart'; | |
final vehicleStateFuture = FutureProvider<List<Vehicle>>((ref) async { | |
return DataController.vehicleDB.getUserVehicles(someUID); | |
}, | |
); |
View indexNotifier.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
import 'package:flutter_riverpod/flutter_riverpod.dart'; | |
final indexNotifier = StateNotifierProvider<IndexNotifier>((ref) { | |
return IndexNotifier(); | |
}); | |
class IndexNotifier extends StateNotifier<int> { | |
IndexNotifier() : super(0); | |
void changeIndex(int index) { |
View C code
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
main() | |
{ | |
som = 0; k = 4; | |
int pid, k, som; | |
pid = fork(); | |
if (pid == 0) | |
k = 5; | |
else | |
wait(0); | |
for (int i = 3; i <= k; i++) |
View deadlock situation_1
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
public async Task<bool> PerformTextualInputAsync(string text) | |
{ | |
UIElement focusedControl = Keyboard.FocusedElement as UIElement; | |
if (focusedControl != null) | |
{ | |
text = text.ToUpper(System.Globalization.CultureInfo.CurrentCulture); | |
string[] textArray = text.ToCharArray().Select(c => c.ToString()).ToArray(); | |
if (Keyboard.PrimaryDevice.ActiveSource != null) |
View gist:3e74fc6099a9d06e7d46ef0a0bcaf225
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
public async Task<DependencyObject> GetElementAsync(IElementReference elementReference, Visual viewToSearchIn) | |
{ | |
string elementReferenceType = elementReference.Type.Description.ToLower(); | |
if (elementReferenceType.Equals("viewcommand")) | |
{ | |
return GetViewCommandButton(viewToSearchIn, elementReference); | |
} | |
else | |
{ | |
matchedElements = new List<MatchedElement>(); |
View stuck in the middle with view
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
public IEnumerable<DependencyObject> ScanElementsOnMatch(IElementReference elementReference, DependencyObject viewToSearchIn) | |
{ | |
string elementReferenceType = elementReference.Type.Description.ToLower(); | |
int childrenCount = 0; | |
Application.Current.Dispatcher.Invoke(() => { childrenCount = VisualTreeHelper.GetChildrenCount(viewToSearchIn); }); | |
for (var i = 0; i < childrenCount; i++) | |
{ | |
DependencyObject child = null; | |
Application.Current.Dispatcher.Invoke(() => { child = VisualTreeHelper.GetChild(viewToSearchIn, i); }); | |
foreach (DependencyObject meuk in ScanElementsOnMatch(elementReference, child)) |
View method lacking a return
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
public static IEnumerable<T> SelectRecursive<T>(DependencyObject involvedView, Func<T, IEnumerable<T>> selector) | |
{ | |
int childrenCount = 0; | |
Application.Current.Dispatcher.Invoke(() => { childrenCount = VisualTreeHelper.GetChildrenCount(involvedView); }); | |
for (var i = 0; i < childrenCount; i++) | |
{ | |
foreach (T child in selector(involvedView).SelectRecursive(selector)) | |
{ | |
yield return child; |
View ScriptsView.xaml
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
<cs:CollectionView x:Class="ChipSoft.Ezis.AutomatedTesting.Views.ScriptsView" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:cs="http://chipsoft.com/core/presentation" | |
Title="{Binding Title}" | |
CurrentCollection="{Binding CurrentCollection}" | |
CurrentObject="{Binding CurrentObject}" | |
SelectedCollection="{Binding SelectedCollection}" | |
IsMultiSelect="{Binding IsMultiSelect}" | |
cs:ViewLayout.Id="ID" cs:ViewLayout.SubId="SUBID" |
NewerOlder